Update of /cvsroot/audacity/audacity-src/src/import
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv13415/src/import
Modified Files:
ImportQT.cpp
Log Message:
Adapt to recent progress dialog changes.
Index: ImportQT.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/import/ImportQT.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ImportQT.cpp 12 Jan 2009 03:09:20 -0000 1.11
+++ ImportQT.cpp 5 Feb 2009 17:25:49 -0000 1.12
@@ -397,7 +397,7 @@
fillBufferUPP =
NewSoundConverterFillBufferDataUPP(SoundConverterFillBufferCallback);
bool done = false;
- bool cancelled = false;
+ int updateResult = eProgressSuccess;
sampleCount samplesSinceLastCallback = 0;
UInt32 outputFrames;
UInt32 outputBytes;
@@ -405,7 +405,7 @@
#define SAMPLES_PER_CALLBACK 10000
- while(!done && !cancelled)
+ while(!done && updateResult == eProgressSuccess)
{
err = SoundConverterFillBuffer(soundConverter, // a sound converter
fillBufferUPP, // the callback
@@ -430,8 +430,8 @@
samplesSinceLastCallback += outputFrames;
if( samplesSinceLastCallback > SAMPLES_PER_CALLBACK )
{
- cancelled =
!mProgress->Update((wxULongLong_t)cbData.getMediaAtThisTime,
- (wxULongLong_t)cbData.sourceDuration);
+ updateResult =
mProgress->Update((wxULongLong_t)cbData.getMediaAtThisTime,
+
(wxULongLong_t)cbData.sourceDuration);
samplesSinceLastCallback -= SAMPLES_PER_CALLBACK;
}
}
@@ -453,7 +453,7 @@
channels[c]->Flush();
}
- bool res = (!cancelled && err == noErr);
+ bool res = (updateResult == eProgressSuccess && err == noErr);
//
// Extract any metadata
@@ -472,7 +472,7 @@
delete channels[c];
delete[] channels;
- return (cancelled ? eImportCancelled : eImportFailed);
+ return (updateResult == eProgressCancelled ? eProgressCancelled :
eProgressFailed);
}
*outNumTracks = outputFormat.numChannels;
@@ -481,7 +481,7 @@
(*outTracks)[c] = channels[c];
delete[] channels;
- return eImportSuccess;
+ return eProgressSuccess;
}
static const struct
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs