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

Derk-Jan Hartman hartman at videolan.org
Mon May 3 01:41:00 CEST 2004


On 02 mei 2004, at 23:48, Jean-Alexis Montignies wrote:
> 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).

I'm surprised if anything _IS_ working with non stereo devices and G5's.

> 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.

I agree with the HALAudioUnit approach. From what I have gathered it 
seems like the correct approach. Unfortunately VLC has a lack of Mac OS 
X developers that can seriously invest time into VLC atm and most 
definitely a lack of developers that have the audio equipment or the 
knowledge necessary to fix/redesign this. So unless someone else will 
do it, I don't think it will happen any time soon.

DJ

---
Universiteit Twente
Derk-Jan Hartman (d.hartman at student.utwente dot nl)
http://home.student.utwente.nl/d.hartman

-- 
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