[PATCH] dsound: Apply filters before sound is multipled to speakers.

Andrew Eikum aeikum at codeweavers.com
Mon Mar 16 07:19:59 CDT 2015

On Sun, Mar 15, 2015 at 05:51:32PM +0000, Mark Harmstone wrote:
> -    for (i = 0; i < count; i++)
> -        for (channel = 0; channel < dsb->mix_channels; channel++)
> -            dsb->put(dsb, i * ostride, channel, get_current_sample(dsb,
> -                    dsb->sec_mixpos + i * istride, channel));
> +    float* buf;
> +
> +    buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, count * dsb->mix_channels * sizeof(float));

Is it necessary to zero this buffer? I think the whole thing gets
overwritten in the following lines.

I'm a bit concerned that splitting the processing out into another
buffer will affect performance.  Similarly in the resampling case
below, you're adding another loop over every sample.  We already have
a performance issue introduced by the higher quality resampler:


Could we take the slower path in each case only if we have filters to

BTW do you have an application that uses DMOs? I'd be curious to take
a look and add it to my list of dsound test applications.


More information about the wine-devel mailing list