[vlc-devel] MacOS X vlc and multi-stream devices

Jean-Alexis Montignies ja at sente.ch
Sun May 2 23:48:58 CEST 2004


Hi,

(Warning this is technical ;-) )

I've reviewed the coreaudio.c code, because stream selection didn't 
work on my configuration. I have a MOTU 828 mk2. The device presents 
several streams at the same time (14 to 20 channels in 4 streams).

Here's why it doesn't work:
InitDeviceInfo read the number of streams using 
kAudioDevicePropertyStreamConfiguration. I guess it's used for filling 
the menu in the interface. If so, I think kAudioDevicePropertyStreams 
should be used instead, and the number will get higher (So currently 
VLC may miss some streams).

Then GetStreamID get the stream id from the an index (I guess 
corresponding to the index in the menu).

Then InitDevice get the stream format for channel 0. And return the 
format for the first stream as a result, which is not the one selected. 
  I don't know yet how to find which channel/stream to get, but it may 
be possible using kAudioDevicePropertyStreamConfiguration.

Then IOCallback fills the first buffer given by the HAL, which is the 
one for the first stream (So it's consistent with InitDevice).

I think it would be better to implement coreaudio.c to use 
HALAudioUnit, which will take care of conversions and channel mappings.
Meanwhile, finding a fix for the current code may not be to difficult, 
I'm thinking of this.

Greets,

Jean-Alexis Montignies
http://www.sente.ch/

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list