Update of /cvsroot/audacity/audacity-src/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16933/src
Modified Files:
AudioIO.cpp
Log Message:
Add debugging traces to see what rate is trying to be used for playback
Index: AudioIO.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/AudioIO.cpp,v
retrieving revision 1.194
retrieving revision 1.195
diff -u -d -r1.194 -r1.195
--- AudioIO.cpp 11 Nov 2008 00:12:36 -0000 1.194
+++ AudioIO.cpp 9 Jan 2009 21:43:41 -0000 1.195
@@ -1722,6 +1722,9 @@
double AudioIO::GetBestRate(bool capturing, bool playing, double sampleRate)
{
wxArrayLong rates;
+ if (capturing) wxLogDebug(wxT("AudioIO::GetBestRate() for capture"));
+ if (playing) wxLogDebug(wxT("AudioIO::GetBestRate() for playback"));
+ wxLogDebug(wxT("GetBestRate() suggested rate %.0lf Hz"), sampleRate);
if (capturing && !playing) {
rates = GetSupportedCaptureRates(-1, sampleRate);
@@ -1747,6 +1750,7 @@
long rate = (long)sampleRate;
if (rates.Index(rate) != wxNOT_FOUND) {
+ wxLogDebug(wxT("GetBestRate() Returning %.0ld Hz"), rate);
return rate;
/* the easy case - the suggested rate (project rate) is in the list, and
* we can just accept that and send back to the caller. This should be
@@ -1764,6 +1768,7 @@
if (rates.IsEmpty()) {
/* we're stuck - there are no supported rates with this hardware. Error
*/
+ wxLogDebug(wxT("GetBestRate() Error - no supported sample rates"));
return 0;
}
int i;
@@ -1771,10 +1776,12 @@
{
if (rates[i] > rate) {
// supported rate is greater than requested rate
+ wxLogDebug(wxT("GetBestRate() Returning next higher rate - %.0ld
Hz"), rates[i]);
return rates[i];
}
}
+ wxLogDebug(wxT("GetBestRate() Returning highest rate - %.0ld Hz"),
rates[rates.GetCount() - 1]);
return rates[rates.GetCount() - 1]; // the highest available rate
}
------------------------------------------------------------------------------
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