Message304127
Hi there yes this is very much an issue on Arm linux (e.g. Armbian). Calling any function that triggers a call to _ssize(..) - a function which is clearly intended to have no side-effects - instead resets the number of channels (and sample format?) by calling IOCTLs "SNDCTL_DSP_SETFMT" and "SNDCTL_DSP_CHANNELS" with arguments of zero as a way to query the current values.
This doesn't work on many drivers; e.g. they take '0' as meaning 'mono' and switch to one channel.
To repro:
import ossaudiodev
self.dsp=ossaudiodev.open("/dev/dsp1","w")
self.dsp.setfmt(ossaudiodev.AFMT_S16_LE)
self.dsp.channels(2) #<<Set to stereo
self.dsp.speed(96000)
...
self.bufSize=self.dsp.bufsize()
...
#This will output audio in the wrong format (mono)! Remove the innocent looking "bufsize" test above and it will correctly output stereo
self.dsp.write(someData)
Frustrating bug! ;-) |
|
Date |
User |
Action |
Args |
2017-10-11 10:36:16 | richaplin | set | recipients:
+ richaplin, gward, samdennis, rluse |
2017-10-11 10:36:16 | richaplin | set | messageid: <1507718176.36.0.213398074469.issue1566331@psf.upfronthosting.co.za> |
2017-10-11 10:36:16 | richaplin | link | issue1566331 messages |
2017-10-11 10:36:16 | richaplin | create | |
|