2012-01-18, 04:55
Just to expand on #2 above, CSoftAE::Makestream is called by DVDPlayer or PAPlayer with the data format passed via the AEDataFormat structure, and in turn calls CSoftAE:OpenSink without passing that info. OpenSink then looks at the current stream and tries to use it as an override for the incoming stream.
By calling OpenSink with the AEDataFormat structure filled in for the next stream we can play that stream in it's original format. For bitdepth it doesn't matter much as everything converts to float, but for channel layout it's important when shifting down in channels.
I can clean this up a bit if you're not already doing so, and can use the Exclusive Mode GUI setting as a switch. Then it's possible to just leave the sink open for "mixing" or crossfading in share mode but having original content played correctly in Exclusive Mode.
Rather than using the master stream to override we simply play the stream as is by passing the data format to OpenSink.
By calling OpenSink with the AEDataFormat structure filled in for the next stream we can play that stream in it's original format. For bitdepth it doesn't matter much as everything converts to float, but for channel layout it's important when shifting down in channels.
I can clean this up a bit if you're not already doing so, and can use the Exclusive Mode GUI setting as a switch. Then it's possible to just leave the sink open for "mixing" or crossfading in share mode but having original content played correctly in Exclusive Mode.
Rather than using the master stream to override we simply play the stream as is by passing the data format to OpenSink.