11#ifndef __AUDACITY_SEQUENCE__
12#define __AUDACITY_SEQUENCE__
63 static void SetMaxDiskBlockSize(
size_t bytes);
64 static size_t GetMaxDiskBlockSize();
67 static bool IsValidSampleFormat(
const int nValue);
101 sampleCount start,
size_t len,
bool mayThrow)
const;
108 GetFloatSampleView(
sampleCount start,
size_t len,
bool mayThrow)
const;
132 size_t GetIdealAppendLen()
const;
187 void WriteXML(
XMLWriter &xmlFile)
const ;
208 const
std::function<
void(
size_t)> & progressReport = {});
224 size_t GetMaxBlockSize()
const;
225 size_t GetIdealBlockSize()
const;
249 std::atomic<size_t> mBlockCount{ 0 };
260 size_t mAppendBufferLen { 0 };
263 bool mErrorOpening{
false };
298 bool mayThrow)
const;
310 size_t blockRelativeStart,
size_t len,
bool mayThrow);
314 void ConsistencyCheck (
const wxChar *whereStr,
bool mayThrow =
true)
const;
318 static void DebugPrintf
323 (
const BlockArray &block,
size_t maxSamples,
size_t from,
325 bool mayThrow =
true);
331 void CommitChangesIfConsistent
334 void AppendBlocksIfConsistent
335 (
BlockArray &additionalBlocks,
bool replaceLast,
An audio segment is either a whole clip or the silence between clips. Views allow shared references t...
std::shared_ptr< SampleBlockFactory > SampleBlockFactoryPtr
std::deque< SeqBlock * > BlockPtrArray
Append(Adapt< My >([](My &table) { return(WaveChannelSubViews::numFactories() > 1) ? std::make_unique< Entry >("MultiView", Entry::CheckItem, OnMultiViewID, XXO("&Multi-view"), POPUP_MENU_FN(OnMultiView), table, [](PopupMenuHandler &handler, wxMenu &menu, int id){ auto &table=static_cast< WaveTrackMenuTable & >(handler);auto &track=table.FindWaveTrack();const auto &view=WaveChannelView::GetFirst(track);menu.Check(id, view.GetMultiView());}) :nullptr;}))
std::vector< Attribute > AttributesList
abstract base class with methods to produce SampleBlock objects
Abstract class allows access to contents of a block of sound samples, serialization as XML,...
Data structure containing pointer to a sample block and a start time. Element of a BlockArray.
sampleCount start
the sample in the global wavetrack that this block starts at.
std::shared_ptr< SampleBlock > SampleBlockPtr
SeqBlock(const SampleBlockPtr &sb_, sampleCount start_)
SeqBlock Plus(sampleCount delta) const
A WaveTrack contains WaveClip(s). A WaveClip contains a Sequence. A Sequence is primarily an interfac...
bool GetErrorOpening() const
size_t GetAppendBufferLen() const
const BlockArray & GetBlockArray() const
const SampleBlockFactoryPtr & GetFactory() const
SampleBlockFactoryPtr mpFactory
static void ConsistencyCheck(const BlockArray &block, size_t maxSamples, size_t from, sampleCount numSamples, const wxChar *whereStr, bool mayThrow=true)
static size_t sMaxDiskBlockSize
static const char * Sequence_tag
sampleCount GetNumSamples() const
constSamplePtr GetAppendBuffer() const
static const char * WaveBlock_tag
Sequence(const Sequence &)=delete
SampleFormats mSampleFormats
This class is an interface which should be implemented by classes which wish to be able to load and s...
virtual XMLTagHandler * HandleXMLChild(const std::string_view &tag)=0
virtual void HandleXMLEndTag(const std::string_view &WXUNUSED(tag))
virtual bool HandleXMLTag(const std::string_view &tag, const AttributesList &attrs)=0
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
Positions or offsets within audio files need a wide type.
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
WAVE_TRACK_API std::pair< float, float > GetMinMax(const WaveChannel &channel, double t0, double t1, bool mayThrow=true)
WAVE_TRACK_API float GetRMS(const WaveChannel &channel, double t0, double t1, bool mayThrow=true)
WAVE_TRACK_API void CloseLock(WaveTrack &track) noexcept
Should be called upon project close. Not balanced by unlocking calls.