|
|
# OSS Portion of the test | # OSS Portion of the test |
# | # |
try: | try: |
audio_out = ossaudiodev.open('/dev/dsp', 'w') |
audio_out = ossaudiodev.open('w') |
except IOError, e: | except IOError, e: |
OSSResult = ((_('OSS Sound Support'), _('Unable to open /dev/dsp'), 'red')) | OSSResult = ((_('OSS Sound Support'), _('Unable to open /dev/dsp'), 'red')) |
| |
if audio_out: | if audio_out: |
try: | try: |
audio_out.setparameters(TestSound1.getframerate(), 16, |
audio_out.setparameters(ossaudiodev.AFMT_S16_LE, TestSound1.getnchannels(), TestSound1.getframerate()) |
TestSound1.getnchannels(), ossaudiodev.AFMT_S16_LE, False) |
|
#FIXME: use getsampwidth for 16 and AFMT_S16_LE |
|
except: | except: |
audio_out.close() | audio_out.close() |
OSSResult = ((_('OSS Sound Support'), _('Unable to play sound, your\nSound card may not be configured correctly'), 'red')) | OSSResult = ((_('OSS Sound Support'), _('Unable to play sound, your\nSound card may not be configured correctly'), 'red')) |