mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-03 09:29:30 +02:00
Sequence.cpp does not depend on ODDecodeBlockFile.cpp...
... This frees Sequence.cpp from dependency cycles
This commit is contained in:
parent
0832bccc7b
commit
7b51653b36
@ -40,10 +40,10 @@
|
|||||||
#include <wx/ffile.h>
|
#include <wx/ffile.h>
|
||||||
#include <wx/log.h>
|
#include <wx/log.h>
|
||||||
|
|
||||||
#include "blockfile/ODDecodeBlockFile.h"
|
|
||||||
#include "DirManager.h"
|
#include "DirManager.h"
|
||||||
|
|
||||||
#include "blockfile/SilentBlockFile.h"
|
#include "blockfile/SilentBlockFile.h"
|
||||||
|
#include "blockfile/SimpleBlockFile.h"
|
||||||
|
|
||||||
#include "InconsistencyException.h"
|
#include "InconsistencyException.h"
|
||||||
|
|
||||||
@ -741,20 +741,6 @@ void Sequence::AppendBlock
|
|||||||
// function gets called in an inner loop.
|
// function gets called in an inner loop.
|
||||||
}
|
}
|
||||||
|
|
||||||
///gets an int with OD flags so that we can determine which ODTasks should be run on this track after save/open, etc.
|
|
||||||
unsigned int Sequence::GetODFlags()
|
|
||||||
{
|
|
||||||
unsigned int ret = 0;
|
|
||||||
for (unsigned int i = 0; i < mBlock.size(); i++) {
|
|
||||||
const auto &file = mBlock[i].f;
|
|
||||||
if(!file->IsDataAvailable())
|
|
||||||
ret |= (static_cast< ODDecodeBlockFile * >( &*file ))->GetDecodeType();
|
|
||||||
else if(!file->IsSummaryAvailable())
|
|
||||||
ret |= ODTask::eODPCMSummary;
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
sampleCount Sequence::GetBlockStart(sampleCount position) const
|
sampleCount Sequence::GetBlockStart(sampleCount position) const
|
||||||
{
|
{
|
||||||
int b = FindBlock(position);
|
int b = FindBlock(position);
|
||||||
|
@ -115,9 +115,6 @@ class PROFILE_DLL_API Sequence final : public XMLTagHandler{
|
|||||||
// which supplies it with a file name
|
// which supplies it with a file name
|
||||||
void AppendBlockFile( const BlockFileFactory &factory, size_t len );
|
void AppendBlockFile( const BlockFileFactory &factory, size_t len );
|
||||||
|
|
||||||
///gets an int with OD flags so that we can determine which ODTasks should be run on this track after save/open, etc.
|
|
||||||
unsigned int GetODFlags();
|
|
||||||
|
|
||||||
// Append a blockfile. The blockfile pointer is then "owned" by the
|
// Append a blockfile. The blockfile pointer is then "owned" by the
|
||||||
// sequence. This function is used by the recording log crash recovery
|
// sequence. This function is used by the recording log crash recovery
|
||||||
// code, but may be useful for other purposes. The blockfile must already
|
// code, but may be useful for other purposes. The blockfile must already
|
||||||
|
@ -1599,12 +1599,21 @@ void WaveTrack::AppendCoded(const FilePath &fName, sampleCount start,
|
|||||||
}
|
}
|
||||||
|
|
||||||
///gets an int with OD flags so that we can determine which ODTasks should be run on this track after save/open, etc.
|
///gets an int with OD flags so that we can determine which ODTasks should be run on this track after save/open, etc.
|
||||||
|
#include "blockfile/ODDecodeBlockFile.h"
|
||||||
unsigned int WaveTrack::GetODFlags() const
|
unsigned int WaveTrack::GetODFlags() const
|
||||||
{
|
{
|
||||||
unsigned int ret = 0;
|
unsigned int ret = 0;
|
||||||
for (const auto &clip : mClips)
|
for (const auto &clip : mClips)
|
||||||
{
|
{
|
||||||
ret = ret | clip->GetSequence()->GetODFlags();
|
auto sequence = clip->GetSequence();
|
||||||
|
const auto &blocks = sequence->GetBlockArray();
|
||||||
|
for ( const auto &block : blocks ) {
|
||||||
|
const auto &file = block.f;
|
||||||
|
if(!file->IsDataAvailable())
|
||||||
|
ret |= (static_cast< ODDecodeBlockFile * >( &*file ))->GetDecodeType();
|
||||||
|
else if(!file->IsSummaryAvailable())
|
||||||
|
ret |= ODTask::eODPCMSummary;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user