Update of /cvsroot/audacity/audacity-src/src/ondemand In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21723/src/ondemand
Modified Files: ODDecodeFlacTask.cpp ODManager.cpp Log Message: Fixed MSVC warnings (bool compared to zero and unused variables). Index: ODManager.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/ondemand/ODManager.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- ODManager.cpp 7 Oct 2009 23:31:41 -0000 1.33 +++ ODManager.cpp 6 Dec 2009 00:21:08 -0000 1.34 @@ -322,7 +322,8 @@ paused=mPause; mPauseLock.Unlock(); - while(!paused && tasksInArray&& mCurrentThreads < mMaxThreads) + // keep adding tasks if there is work to do, up to the limit. + while(!paused && tasksInArray && (mCurrentThreads < mMaxThreads)) { mCurrentThreads++; mCurrentThreadsMutex.Unlock(); @@ -352,8 +353,10 @@ mCurrentThreadsMutex.Unlock(); //use a conditon variable to block here instead of a sleep. + // JKC: If there are no tasks ready to run, or we're paused then + // we wait for there to be tasks in the queue. mQueueNotEmptyCondLock.Lock(); - if(tasksInArray<=0 || paused) + if( (!tasksInArray) || paused) mQueueNotEmptyCond->Wait(); mQueueNotEmptyCondLock.Unlock(); @@ -366,7 +369,7 @@ //redraw the current project only (ODTasks will send a redraw on complete even if the projects are in the background) //we don't want to redraw at a faster rate when we have more queues because //this means the CPU is already taxed. This if statement normalizes the rate - if(mNeedsDraw>numQueues && numQueues) + if((mNeedsDraw>numQueues) && numQueues) { mNeedsDraw=0; wxCommandEvent event( EVT_ODTASK_UPDATE ); Index: ODDecodeFlacTask.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/ondemand/ODDecodeFlacTask.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ODDecodeFlacTask.cpp 11 Oct 2009 19:31:09 -0000 1.6 +++ ODDecodeFlacTask.cpp 6 Dec 2009 00:21:08 -0000 1.7 @@ -113,14 +113,10 @@ //the inside of the read loop. FLAC__StreamDecoderWriteStatus ODFLACFile::write_callback(const FLAC__Frame *frame, - const FLAC__int32 * const buffer[]) + const FLAC__int32 * const buffer[]) { - - float testfdb; - float testfb; - int testi; - int bytesToCopy = frame->header.blocksize; + unsigned int bytesToCopy = frame->header.blocksize; if(bytesToCopy>mDecoder->mDecodeBufferLen-mDecoder->mDecodeBufferWritePosition) bytesToCopy=mDecoder->mDecodeBufferLen-mDecoder->mDecodeBufferWritePosition; ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs