(bugs 20 and 137, P2) Working on these bugs, tightened up some code and corrected some comments.
This commit is contained in:
parent
e46abdbeaa
commit
ec047e7c71
|
@ -8,20 +8,22 @@
|
|||
|
||||
*******************************************************************//**
|
||||
\file Sequence.cpp
|
||||
\brief Appears to duplicate some structures such as SeqBlock that are
|
||||
also found in Track.cpp.
|
||||
\brief Implements classes Sequence and SeqBlock.
|
||||
|
||||
*//****************************************************************//**
|
||||
|
||||
\class Sequence
|
||||
\brief Has a sequence of samples. Compare with RingBuffer.
|
||||
\brief A WaveTrack contains WaveClip(s).
|
||||
A WaveClip contains a Sequence. A Sequence is primarily an
|
||||
interface to an array of SeqBlock instances, corresponding to
|
||||
the audio BlockFiles on disk.
|
||||
Contrast with RingBuffer.
|
||||
|
||||
*//****************************************************************//**
|
||||
|
||||
\class SeqBlock
|
||||
\brief Pointer to a BlockFile along with a start time. Element of
|
||||
a BlockArray. WARNING defined differently in Track.cpp and
|
||||
Sequence.cpp. Not yet sure why.
|
||||
\brief Data structure containing pointer to a BlockFile and
|
||||
a start time. Element of a BlockArray.
|
||||
|
||||
*//*******************************************************************/
|
||||
|
||||
|
|
|
@ -1108,16 +1108,13 @@ bool WaveClip::AppendCoded(wxString fName, sampleCount start,
|
|||
|
||||
bool WaveClip::Flush()
|
||||
{
|
||||
//wxLogDebug(wxT("Flush!"));
|
||||
//wxLogDebug(wxT("WaveClip::Flush"));
|
||||
//wxLogDebug(wxT(" mAppendBufferLen=%i\n"), mAppendBufferLen);
|
||||
//wxLogDebug(wxT(" previous sample count %i\n"), mSequence->GetNumSamples());
|
||||
|
||||
bool success = true;
|
||||
sampleFormat seqFormat = mSequence->GetSampleFormat();
|
||||
|
||||
//wxLogDebug(wxT("mAppendBufferLen=%i\n"), mAppendBufferLen);
|
||||
//wxLogDebug(wxT("previous sample count %i\n"), mSequence->GetNumSamples());
|
||||
|
||||
if (mAppendBufferLen > 0) {
|
||||
success = mSequence->Append(mAppendBuffer, seqFormat, mAppendBufferLen);
|
||||
success = mSequence->Append(mAppendBuffer, mSequence->GetSampleFormat(), mAppendBufferLen);
|
||||
if (success) {
|
||||
mAppendBufferLen = 0;
|
||||
UpdateEnvelopeTrackLen();
|
||||
|
|
Loading…
Reference in New Issue