Skip to content

Commit

Permalink
Use the rtAudio frames if audio is not found in the cache
Browse files Browse the repository at this point in the history
  • Loading branch information
darbyjohnston committed Sep 18, 2024
1 parent 108cc69 commit 378c2a5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/tlTimeline/PlayerAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,19 @@ namespace tl
}

// Update the frame counter.
int64_t inc = 0;
if (!found)
{
inc = OTIO_NS::RationalTime(nFrames, outputInfo.sampleRate).
rescaled_to(inputInfo.sampleRate).value();
}
else if (size > 0)
{
inc = size;
}
{
std::unique_lock<std::mutex> lock(p->audioMutex.mutex);
p->audioMutex.frame += size;
p->audioMutex.frame += inc;
}
}

Expand Down

0 comments on commit 378c2a5

Please sign in to comment.