Skip to content

Commit

Permalink
AudioEngineTests: tweak comments
Browse files Browse the repository at this point in the history
  • Loading branch information
theGreatWhiteShark committed Oct 31, 2024
1 parent 2dc167b commit 3084f27
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/core/AudioEngine/AudioEngineTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2068,7 +2068,7 @@ void AudioEngineTests::testTransportProcessingJack() {

auto pDriver = startJackAudioDriver();
if ( pDriver == nullptr ) {
throwException( "[testTransportRelocationJack] Unable to use JACK driver" );
throwException( "[testTransportProcessingJack] Unable to use JACK driver" );
}

// In case the reference Hydrogen is JACK Timebase controller, Timeline of
Expand Down Expand Up @@ -2170,9 +2170,9 @@ void AudioEngineTests::testTransportRelocationJack() {
const int nIncrement = 100;

// We send the tick value to and received it back from the JACK server
// via rountines in the libjack2 library. We have to relaxed about the
// via routines of the libjack2 library. We have to be relaxed about the
// precision we can expect from relocating.
while( true ) {
while ( true ) {

long long nCurrentFrame;
if ( pHydrogen->getJackTimebaseState() ==
Expand Down Expand Up @@ -2266,19 +2266,21 @@ void AudioEngineTests::testTransportRelocationJack() {

pAE->lock( RIGHT_HERE );

// Ensure we relocate to a new position. Else the assertions in this
// test will fail.
while ( std::abs( fNewTick - pTransportPos->getDoubleTick() ) < 1 ) {
fNewTick = tickDist( randomEngine );
}

INFOLOG( QString( "relocate to tick [%1]" ).arg( fNewTick ) );
INFOLOG( QString( "relocate to tick [%1]->[%2]" )
.arg( pTransportPos->getDoubleTick() ).arg( fNewTick ) );
pAE->locate( fNewTick, true );
pAE->unlock();


waitForRelocation( fNewTick, -1 );
// We send the tick value to and received it back from the JACK
// server via rountines in the libjack2 library. We have to relaxed
// about the precision we can expect from relocating.
// We send the tick value to and receive it from the JACK server via
// routines in the libjack2 library. We have to be relaxed about the
// precision we can expect.
if ( abs( pTransportPos->getDoubleTick() - fNewTick ) > 1e-1 ) {
throwException( QString( "[testTransportRelocationJack::tick] failed to relocate to tick. [%1] != [%2]" )
.arg( pTransportPos->getDoubleTick() ).arg( fNewTick ) );
Expand Down Expand Up @@ -2328,7 +2330,8 @@ void AudioEngineTests::testTransportRelocationJack() {
}
#endif

INFOLOG( QString( "relocate to frame [%1]" ).arg( nNewFrame ) );
INFOLOG( QString( "relocate to frame [%1]->[%2]" )
.arg( pTransportPos->getFrame() ).arg( nNewFrame ) );
pDriver->locateTransport( nNewFrame );
pAE->unlock();

Expand Down

0 comments on commit 3084f27

Please sign in to comment.