Skip to content

Commit

Permalink
Recording: Added some extra checks
Browse files Browse the repository at this point in the history
  • Loading branch information
drowaudio committed Jul 29, 2024
1 parent e31a60b commit 5ab4a04
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class WaveInputDevice : public InputDevice

//==============================================================================
void setRecordAdjustment (TimeDuration);
TimeDuration getRecordAdjustment() const { return TimeDuration::fromSeconds (recordAdjustMs / 1000.0); }
void setRecordAdjustmentMs (double ms);
double getRecordAdjustmentMs() const { return recordAdjustMs; }
bool isStereoPair() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ namespace tracktion::inline engine
auto& tc = edit->getTransport();
tc.ensureContextAllocated();

CHECK_EQ(engine.getDeviceManager().getWaveInputDevices()[0]->getRecordAdjustment(), 0_td);

auto squareFile = graph::test_utilities::getSquareFile<juce::WavAudioFormat> (44100.0, 5.0, 1);
auto squareBuffer = *engine::test_utilities::loadFileInToBuffer (engine, squareFile->getFile());

Expand Down Expand Up @@ -75,6 +77,7 @@ namespace tracktion::inline engine
auto destAssignment = edit->getCurrentPlaybackContext()->getAllInputs()[0]->setTarget (destTrack.itemID, true, nullptr);
(*destAssignment)->recordEnabled = true;
edit->dispatchPendingUpdatesSynchronously();
CHECK_EQ(engine.getDeviceManager().getWaveInputDevices()[0]->getRecordAdjustment(), 0_td);

test_utilities::TempCurrentWorkingDirectory tempDir;
tc.record (false);
Expand Down
2 changes: 2 additions & 0 deletions modules/tracktion_engine/testing/tracktion_RoundTripLatency.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ inline LatencyTesterResult getLatencyTesterResult (DeviceManager& dm, int detect

return res;
}


//==============================================================================
//==============================================================================
struct LatencyTester : public juce::AudioIODeviceCallback,
Expand Down

0 comments on commit 5ab4a04

Please sign in to comment.