11#ifndef __AUDACITY_SEQUENCE__
12#define __AUDACITY_SEQUENCE__
56 #define PROFILE_DLL_API WAVE_TRACK_API
58 #define PROFILE_DLL_API
68 static void SetMaxDiskBlockSize(
size_t bytes);
69 static size_t GetMaxDiskBlockSize();
72 static bool IsValidSampleFormat(
const int nValue);
94 sampleCount start,
size_t len,
bool mayThrow)
const;
118 size_t GetIdealAppendLen()
const;
170 void WriteXML(
XMLWriter &xmlFile)
const ;
190 const std::function<
void(
size_t)> & progressReport = {});
196 std::pair<float, float> GetMinMax(
209 size_t GetMaxBlockSize()
const;
210 size_t GetIdealBlockSize()
const;
247 size_t mAppendBufferLen { 0 };
250 bool mErrorOpening{
false };
282 bool mayThrow)
const;
294 size_t blockRelativeStart,
size_t len,
bool mayThrow);
298 void ConsistencyCheck (
const wxChar *whereStr,
bool mayThrow =
true)
const;
302 static void DebugPrintf
307 (
const BlockArray &block,
size_t maxSamples,
size_t from,
309 bool mayThrow =
true);
315 void CommitChangesIfConsistent
318 void AppendBlocksIfConsistent
319 (
BlockArray &additionalBlocks,
bool replaceLast,
gPrefs Read(wxT("/GUI/VerticalZooming"), &bVZoom, false)
std::shared_ptr< SampleBlockFactory > SampleBlockFactoryPtr
std::vector< SeqBlock * > BlockPtrArray
Append([](My &table) -> Registry::BaseItemPtr { if(WaveTrackSubViews::slots() > 1) return 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=WaveTrackView::Get(track);menu.Check(id, view.GetMultiView());});else return 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...
const SampleBlockFactoryPtr & GetFactory()
size_t GetAppendBufferLen() const
const BlockArray & GetBlockArray() 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
sampleCount GetNumSamples() const
constSamplePtr GetAppendBuffer() const
Sequence(const Sequence &)=delete
BlockArray & GetBlockArray()
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.
static RegisteredToolbarFactory factory