On May 6, 2005, at 23:55 , Chris Roccati wrote:
Hello all, there must be something wrong in the ao_macosx.c code which tries to change the audio sampling rate: with the USB Audio of the G4 cube it works fine under Mac OS 10.3.x but it will try to set the configuration to something weird under Mac OS X 10.4. Everything works fine ommenting out the lines 366/367/368 (the code that calls AudioDeviceSetProperty()) even if, atleast in theory, the code is actually trying to set the format to the one actually in use.
If found what's wrong: in the AudioDeviceGetProperty call for kAudioDevicePropertyStreamFormatMatch, the stream description does not indicate the number of channels required. The first match, atleast here is for a single channel audio. The attached patch, adds to the requested format the number of channels.