Hi,

Chris Robinson wrote:
>> You forgot AUDCLNT_STREAMFLAGS_RATEADJUST since w7.
>Interestingly, this flag seems to only have an effect for already-initialized 
>streams. ALSA would need a way to adjust the rate of an opened device for this 
>to work.

My view on it is this: given that it's said to work in shared mode only, I 
believe
it gives limited access to MS' internal resampler device.  Output is still 
driven at
the mixer's nomimal rate, there's no need to adjust the rate of an open ALSA 
back-end.

IOW, if you were to implement winmm on top of mmdevapi in w7, here's what you'd 
do:
. Call Activate
. Call GetMixFormat
. If rate is different from requested, add AUDCLNT_STREAMFLAGS_RATEADJUST
. call Initialize
. If rate is different, call SetSampleRate

The native resampler adjusts the rates, the mixer adjusts bit width and 
whatever entity adjusts
the channel mapping (formerly the NT kernel mixer was said to do that).

I suppose MS' mmdevapi behaves like gstreamer as a sequence of audio filters and
converters. If you ask for a rate resampler, it'll plug one into the chain.  
Plugging can
only be performed at initialization time, there's no further dynamic 
reconfiguration.

That's why I'll repeat once more and say that DSound's resampler should become 
that one.

My little knowledge about DSound's 3 initialisation modes (WRITE_PRIMARY etc.)
tells me it's compatible with such a scheme: there are restriction on when 
you're allowed to
invoke SetFormat on the Primary buffer.

Regards,
 Jörg Höhle


Reply via email to