Update of /cvsroot/audacity/lib-src/portmixer/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv1227

Modified Files:
        px_win_common.c px_win_ds.c 
Log Message:
Fix incorrect mixer ID usage

Index: px_win_common.c
===================================================================
RCS file: /cvsroot/audacity/lib-src/portmixer/src/px_win_common.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- px_win_common.c     5 Oct 2006 22:59:44 -0000       1.2
+++ px_win_common.c     12 Apr 2009 11:24:51 -0000      1.3
@@ -86,14 +86,14 @@
    info->numInputs = 0;
    info->muxID = 0;
    info->speakerID = 0;
-       info->waveID = 0;
+   info->waveID = 0;
 
    if (deviceIn != UINT_MAX) {
       res = mixerOpen((LPHMIXER) &info->hInputMixer,
                       deviceIn,
                       0,
                       0,
-                      MIXER_OBJECTF_WAVEIN);
+                      MIXER_OBJECTF_MIXER);
       if (res != MMSYSERR_NOERROR) {
          return cleanup(Px);
       }
@@ -121,7 +121,7 @@
                       deviceOut,
                       0,
                       0,
-                      MIXER_OBJECTF_WAVEOUT);
+                      MIXER_OBJECTF_MIXER);
       if (res != MMSYSERR_NOERROR) {
          return cleanup(Px);
       }

Index: px_win_ds.c
===================================================================
RCS file: /cvsroot/audacity/lib-src/portmixer/src/px_win_ds.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- px_win_ds.c 22 Oct 2006 05:55:10 -0000      1.2
+++ px_win_ds.c 12 Apr 2009 11:24:52 -0000      1.3
@@ -136,7 +136,12 @@
             break;
          }
 
-         deviceIn = desc.WaveDeviceId;
+         hr = mixerGetID((HMIXEROBJ) desc.WaveDeviceId,
+                         &deviceIn,
+                         MIXER_OBJECTF_WAVEIN);
+         if (hr != MMSYSERR_NOERROR) {
+           break;
+         }
       }
    
       if (guidOut) {
@@ -153,8 +158,13 @@
          if (FAILED(hr)) {
             break;
          }
-   
-         deviceOut = desc.WaveDeviceId;
+
+         hr = mixerGetID((HMIXEROBJ) desc.WaveDeviceId,
+                         &deviceOut,
+                         MIXER_OBJECTF_WAVEOUT);
+         if (hr != MMSYSERR_NOERROR) {
+           break;
+         }
       }
 
       if (open_mixers(Px, deviceIn, deviceOut))


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to