Changeset 2343

Show
Ignore:
Timestamp:
08/07/08 06:58:49 (4 months ago)
Author:
bzr
Message:

nvwave: When retrieving output devices, gracefully skip a device if an exception is thrown while trying ot retrieve information for that device. It seems Windows sometimes includes devices which cannot be accessed; e.g. when using Remote Desktop. This issue was causing NVDA not to start in those cases.

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property bzr:revision-id:v3-list-QlpoOTFBWSZTWbrL2vUAAB1VgAAQABCAQDrrnqAgAFCgaaGRkxBoTIJ6mmaNRwhndFAoNhZjh_YY4a01fOg1ulgNNC2UrzPdXXEnDpX8XckU4UJC6y9r1A..
      •  

        old new  
        1741742142 jamie@jantrid.net-20080806124925-tf7ysid43o0u8s32 
        1751752143 jamie@jantrid.net-20080806131026-gf5kkxlhia4dnff9 
         1762145 jamie@jantrid.net-20080807065623-wh0xcx1l34f41h39 
    • Property bzr:revision-info
      •  

        old new  
        1 timestamp: 2008-08-06 23:10:26.323999882 +1000 
         1timestamp: 2008-08-07 16:56:23.848000050 +1000 
        22committer: James Teh <jamie@jantrid.net> 
        33properties:  
  • trunk/source/nvwave.py

    r2077 r2343  
    197197        caps = WAVEOUTCAPS() 
    198198        for devID in xrange(-1, winmm.waveOutGetNumDevs()): 
    199                 windll.winmm.waveOutGetDevCapsW(devID, byref(caps), sizeof(caps)) 
    200                 yield devID, caps.szPname 
     199                try: 
     200                        windll.winmm.waveOutGetDevCapsW(devID, byref(caps), sizeof(caps)) 
     201                        yield devID, caps.szPname 
     202                except WindowsError: 
     203                        # It seems that in certain cases, Windows includes devices which cannot be accessed. 
     204                        pass 
    201205 
    202206def getOutputDeviceNames():