Lines 40-54
Link Here
|
40 |
# OSS Portion of the test |
40 |
# OSS Portion of the test |
41 |
# |
41 |
# |
42 |
try: |
42 |
try: |
43 |
audio_out = ossaudiodev.open('/dev/dsp', 'w') |
43 |
audio_out = ossaudiodev.open('w') |
44 |
except IOError, e: |
44 |
except IOError, e: |
45 |
OSSResult = ((_('OSS Sound Support'), _('Unable to open /dev/dsp'), 'red')) |
45 |
OSSResult = ((_('OSS Sound Support'), _('Unable to open /dev/dsp'), 'red')) |
46 |
|
46 |
|
47 |
if audio_out: |
47 |
if audio_out: |
48 |
try: |
48 |
try: |
49 |
audio_out.setparameters(TestSound1.getframerate(), 16, |
49 |
audio_out.setparameters(ossaudiodev.AFMT_S16_LE, TestSound1.getnchannels(), TestSound1.getframerate()) |
50 |
TestSound1.getnchannels(), ossaudiodev.AFMT_S16_LE, False) |
|
|
51 |
#FIXME: use getsampwidth for 16 and AFMT_S16_LE |
52 |
except: |
50 |
except: |
53 |
audio_out.close() |
51 |
audio_out.close() |
54 |
OSSResult = ((_('OSS Sound Support'), _('Unable to play sound, your\nSound card may not be configured correctly'), 'red')) |
52 |
OSSResult = ((_('OSS Sound Support'), _('Unable to play sound, your\nSound card may not be configured correctly'), 'red')) |