From: Pierre-Jean L. <pj-...@us...> - 2005-10-17 17:58:45
|
Update of /cvsroot/wired/wired/src/sequencer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9216/src/sequencer Modified Files: Sequencer.cpp Sequencer.h Log Message: Fixed some curious behaviour on exporting wave. Index: Sequencer.h =================================================================== RCS file: /cvsroot/wired/wired/src/sequencer/Sequencer.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Sequencer.h 10 Oct 2005 17:22:12 -0000 1.9 --- Sequencer.h 17 Oct 2005 17:58:32 -0000 1.10 *************** *** 33,39 **** void DeleteBuffer() { ! delete[] Buffer[0]; if (Buffer[1]) ! delete[] Buffer[1]; delete Buffer; } --- 33,39 ---- void DeleteBuffer() { ! delete Buffer[0]; if (Buffer[1]) ! delete Buffer[1]; delete Buffer; } Index: Sequencer.cpp =================================================================== RCS file: /cvsroot/wired/wired/src/sequencer/Sequencer.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Sequencer.cpp 14 Oct 2005 13:25:21 -0000 1.31 --- Sequencer.cpp 17 Oct 2005 17:58:32 -0000 1.32 *************** *** 898,905 **** --- 898,920 ---- if (SampleRateConverter) { + + cout << "Write Export" << endl; + // for (i = 0, j = 0; i < Audio->SamplesPerBuffer; j++) + // { + // AllocBuf1[0][i++] = Mix->OutputLeft[j]; + // AllocBuf1[0][i++] = Mix->OutputRight[j]; + // } + // SampleRateConverter->WriteToFile((unsigned long) Audio->SamplesPerBuffer, AllocBuf1, 2); + // for (i = 0; i < Audio->SamplesPerBuffer; j++) + // { + // AllocBuf1[0][i++] = Mix->OutputLeft[j]; + // AllocBuf1[0][i++] = Mix->OutputRight[j]; + // } + // SampleRateConverter->WriteToFile((unsigned long) Audio->SamplesPerBuffer, AllocBuf1, 2); //SeqMutex.Lock(); memcpy(AllocBuf1[0], Mix->OutputLeft, Audio->SamplesPerBuffer); memcpy(AllocBuf1[1], Mix->OutputRight, Audio->SamplesPerBuffer); SampleRateConverter->WriteToFile((unsigned long) Audio->SamplesPerBuffer, AllocBuf1, 2); + cout << "Write Export ended" << endl; //SeqMutex.Unlock(); } |