[PATCH 1/4] xaudio2: Implement IXAudio2SourceVoice frequency functions

Andrew Eikum aeikum at codeweavers.com
Wed Sep 16 08:08:23 CDT 2015


On Tue, Sep 15, 2015 at 07:06:11PM -0700, Chris Robinson wrote:
> This doesn't strike me as correct. Assuming the SampleRate or
> FrequencyRatio can be altered in real-time, this will break the
> OpenAL buffer queue which needs to have the same sample rate on each
> buffer. SetFrequencyRatio looks like it'd map directly to the AL
> source's pitch property, while SetSourceSampleRate may be a bit
> trickier depending on when it's allowed to be called (it'd require
> stopping the source and clearing the queue, then rebuffering and
> requeueing the buffers to start where it left off).
> 

Thanks again for the review! It's nice having an AL expert review my
usage; I didn't know all queued AL buffers had to have the same sample
rate. I'll look into using the pitch property, and re-queueing buffers
shouldn't be too hard, I think.

> Also, I notice the OperationSet parameter isn't used. What is that for?

It's used for syncronizing changes to different objects. Queue up
several changes with the same OperationSet, then execute all the
changes at the same time with IXAudio2::CommitChanges. I haven't
implemented that yet, and I don't see it used very often in my testing
programs.  We'll want it eventually, but it's not a priority.

Andrew



More information about the wine-devel mailing list