23#ifndef AUDIO_ENGINE_TESTS_H
24#define AUDIO_ENGINE_TESTS_H
35 class TransportPosition;
101 long long* nLastLookahead,
102 long long* nLastTransportFrame,
103 long long* nTotalFrames,
104 long* nLastPlayheadTick,
105 double* fLastTickIntervalEnd,
106 bool bCheckLookahead =
true );
123 const std::vector<std::shared_ptr<Note>> newNotes,
124 const QString& sContext,
126 bool bTestAudio =
true,
127 float fPassedTicks = 0.0 );
140 static void mergeQueues( std::vector<std::shared_ptr<Note>>* noteList,
141 std::vector<std::shared_ptr<Note>> newNotes );
142 static void mergeQueues( std::vector<std::shared_ptr<Note>>* noteList,
143 std::vector<Note*> newNotes );
Defined in here since it requires access to methods and variables private to the #AudioEngine class.
static std::vector< std::shared_ptr< Note > > copySongNoteQueue()
static void testTransportProcessingTimeline()
More detailed test of the transport and playhead integrity in case Timeline/tempo markers are involve...
static void testLoopMode()
Unit test checking that loop mode as well as deactivating it works.
static void testSongSizeChange()
Unit test checking consistency of transport position when playback was looped at least once and the s...
static void toggleAndCheckConsistency(int nToggleColumn, int nToggleRow, const QString &sContext)
Toggles the grid cell defined by nToggleColumn and nToggleRow twice and checks whether the transport ...
static void testNoteEnqueuing()
Unit test checking that all notes in a song are picked up once.
static void checkTransportPosition(std::shared_ptr< TransportPosition > pPos, const QString &sContext)
Checks the consistency of the transport position pPos by converting the current tick,...
static void testTransportRelocation()
Unit test checking the relocation of the transport position in audioEngine_process().
static void testTransportProcessing()
Unit test checking the incremental update of the transport position in audioEngine_process().
static void testNoteEnqueuingTimeline()
Checks whether the order of notes enqueued and processed by the Sampler is consistent on tempo change...
static void testSongSizeChangeInLoopMode()
Unit test checking consistency of transport position when playback was looped at least once and the s...
static void resetSampler(const QString &sContext)
static int processTransport(const QString &sContext, int nFrames, long long *nLastLookahead, long long *nLastTransportFrame, long long *nTotalFrames, long *nLastPlayheadTick, double *fLastTickIntervalEnd, bool bCheckLookahead=true)
static void mergeQueues(std::vector< std::shared_ptr< Note > > *noteList, std::vector< std::shared_ptr< Note > > newNotes)
Add every Note in newNotes not yet contained in noteList to the latter.
static void throwException(const QString &sMsg)
static void testFrameToTickConversion()
Unit test checking for consistency when converting frames to ticks and back.
static void testHumanization()
Unit test checking that custom note properties take effect and that humanization works as expected.
static void checkAudioConsistency(const std::vector< std::shared_ptr< Note > > oldNotes, const std::vector< std::shared_ptr< Note > > newNotes, const QString &sContext, int nPassedFrames, bool bTestAudio=true, float fPassedTicks=0.0)
Takes two instances of Sampler::m_playingNotesQueue and checks whether matching notes have exactly nP...