Update of /cvsroot/audacity/audacity-src/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12638/src
Modified Files:
AudioIO.cpp
Log Message:
Skip a bunch of device info if there are no supported sample rates on the
devices. Avoids a crash if you ask for device info when the selected device is
broke.
Index: AudioIO.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/AudioIO.cpp,v
retrieving revision 1.195
retrieving revision 1.196
diff -u -d -r1.195 -r1.196
--- AudioIO.cpp 9 Jan 2009 21:43:41 -0000 1.195
+++ AudioIO.cpp 10 Jan 2009 22:21:32 -0000 1.196
@@ -2041,7 +2041,9 @@
}
#if defined(USE_PORTMIXER)
- int highestSampleRate =
supportedSampleRates[supportedSampleRates.GetCount() - 1];
+ if (supportedSampleRates.GetCount() > 0)
+ {
+ int highestSampleRate =
supportedSampleRates[supportedSampleRates.GetCount() - 1];
bool EmulateMixerInputVol = true;
bool EmulateMixerOutputVol = true;
float MixerInputVol = 1.0;
@@ -2094,7 +2096,7 @@
audacityAudioCallback, NULL);
}
-#else
+#else // PA v18
PortAudioStream *stream;
@@ -2110,7 +2112,7 @@
audacityAudioCallback, NULL);
}
-#endif
+#endif // PX v19/18
if (error) {
s << wxT("Recieved ") << error << wxT(" while opening devices") << e;
@@ -2185,7 +2187,7 @@
Px_CloseMixer(PortMixer);
#endif
-
+ }
return o.GetString();
}
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs