mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AudioPlayHead: Improve granularity of position info
This commit is contained in:
parent
891daf1332
commit
8fbd99c424
27 changed files with 924 additions and 572 deletions
|
|
@ -486,11 +486,12 @@ public:
|
|||
|
||||
struct SimplePlayHead : public juce::AudioPlayHead
|
||||
{
|
||||
bool getCurrentPosition (CurrentPositionInfo& result) override
|
||||
Optional<PositionInfo> getPosition() const override
|
||||
{
|
||||
result.timeInSamples = timeInSamples.load();
|
||||
result.isPlaying = isPlaying.load();
|
||||
return true;
|
||||
PositionInfo result;
|
||||
result.setTimeInSamples (timeInSamples.load());
|
||||
result.setIsPlaying (isPlaying.load());
|
||||
return result;
|
||||
}
|
||||
|
||||
std::atomic<int64_t> timeInSamples { 0 };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue