[Bug 11764] Add support for multi-channel audio

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Apr 5 16:39:59 CDT 2011


http://bugs.winehq.org/show_bug.cgi?id=11764

Philipp Middendorf <pmidden at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pmidden at gmx.net

--- Comment #41 from Philipp Middendorf <pmidden at gmx.net> 2011-04-05 16:39:58 CDT ---
I don't know if this the right thread for this, but I think I fixed a bug in
the multi-channel code:

The problem was: sound in PES 2010 only partially works: effects work, music
and commentator doesn't. 

Debugging the problem, I noticed that the "cp_fields" function in
dlls/dsound/mixer.c is called with device->pwfx->nChannels == 8 and
dsb->pwfx->nChannels == 2. Since the case 6 vs. 2 channels was already in
there, I added 8 vs. 2 channels and it worked perfectly. Here's the small
patch:

diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index 846278e..5ed8d90 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -295,6 +295,7 @@ static inline void cp_fields(const IDirectSoundBufferImpl
*dsb, const BYTE *ibuf

     if (device->pwfx->nChannels == dsb->pwfx->nChannels ||
         (device->pwfx->nChannels == 2 && dsb->pwfx->nChannels == 6) ||
+        (device->pwfx->nChannels == 8 && dsb->pwfx->nChannels == 2) ||
         (device->pwfx->nChannels == 6 && dsb->pwfx->nChannels == 2)) {
         dsb->convert(ibuf, obuf, istride, ostride, count, freqAcc, adj);
         if (device->pwfx->nChannels == 2 || dsb->pwfx->nChannels == 2)

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list