diff options
author | Jörg Müller <nexyon@gmail.com> | 2020-05-03 16:25:52 +0300 |
---|---|---|
committer | Jörg Müller <nexyon@gmail.com> | 2020-05-03 16:30:35 +0300 |
commit | fe891d581dfece13b42414ba1d8fec6063290a31 (patch) | |
tree | f637697a4b96c5a9522d61fc500eba64a623fa19 /extern/audaspace/plugins/jack | |
parent | 2b7d5caae8a1f00a137247af819529ed5e8d0200 (diff) |
Audaspace: update from upstream
- Changing API for time values from float to double for better precision.
- Fixing minor mistakes in the documentation.
- Fixing minor unnecessary large memory allocation.
Diffstat (limited to 'extern/audaspace/plugins/jack')
-rw-r--r-- | extern/audaspace/plugins/jack/JackDevice.cpp | 6 | ||||
-rw-r--r-- | extern/audaspace/plugins/jack/JackDevice.h | 4 | ||||
-rw-r--r-- | extern/audaspace/plugins/jack/JackSynchronizer.cpp | 4 | ||||
-rw-r--r-- | extern/audaspace/plugins/jack/JackSynchronizer.h | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/extern/audaspace/plugins/jack/JackDevice.cpp b/extern/audaspace/plugins/jack/JackDevice.cpp index 1d238f74c3a..32874fd1315 100644 --- a/extern/audaspace/plugins/jack/JackDevice.cpp +++ b/extern/audaspace/plugins/jack/JackDevice.cpp @@ -292,7 +292,7 @@ void JackDevice::stopPlayback() m_nextState = JackTransportStopped; } -void JackDevice::seekPlayback(float time) +void JackDevice::seekPlayback(double time) { if(time >= 0.0f) AUD_jack_transport_locate(m_client, time * m_specs.rate); @@ -304,11 +304,11 @@ void JackDevice::setSyncCallback(ISynchronizer::syncFunction sync, void* data) m_syncFuncData = data; } -float JackDevice::getPlaybackPosition() +double JackDevice::getPlaybackPosition() { jack_position_t position; AUD_jack_transport_query(m_client, &position); - return position.frame / (float) m_specs.rate; + return position.frame / (double) m_specs.rate; } bool JackDevice::doesPlayback() diff --git a/extern/audaspace/plugins/jack/JackDevice.h b/extern/audaspace/plugins/jack/JackDevice.h index 72143eda149..4e6b1f5d12c 100644 --- a/extern/audaspace/plugins/jack/JackDevice.h +++ b/extern/audaspace/plugins/jack/JackDevice.h @@ -174,7 +174,7 @@ public: * Seeks jack transport playback. * \param time The time to seek to. */ - void seekPlayback(float time); + void seekPlayback(double time); /** * Sets the sync callback for jack transport playback. @@ -187,7 +187,7 @@ public: * Retrieves the jack transport playback time. * \return The current time position. */ - float getPlaybackPosition(); + double getPlaybackPosition(); /** * Returns whether jack transport plays back. diff --git a/extern/audaspace/plugins/jack/JackSynchronizer.cpp b/extern/audaspace/plugins/jack/JackSynchronizer.cpp index cd4c448786d..0bcafa19ca5 100644 --- a/extern/audaspace/plugins/jack/JackSynchronizer.cpp +++ b/extern/audaspace/plugins/jack/JackSynchronizer.cpp @@ -25,12 +25,12 @@ JackSynchronizer::JackSynchronizer(JackDevice* device) : { } -void JackSynchronizer::seek(std::shared_ptr<IHandle> handle, float time) +void JackSynchronizer::seek(std::shared_ptr<IHandle> handle, double time) { m_device->seekPlayback(time); } -float JackSynchronizer::getPosition(std::shared_ptr<IHandle> handle) +double JackSynchronizer::getPosition(std::shared_ptr<IHandle> handle) { return m_device->getPlaybackPosition(); } diff --git a/extern/audaspace/plugins/jack/JackSynchronizer.h b/extern/audaspace/plugins/jack/JackSynchronizer.h index 5c7341a7872..8a1f930ebed 100644 --- a/extern/audaspace/plugins/jack/JackSynchronizer.h +++ b/extern/audaspace/plugins/jack/JackSynchronizer.h @@ -48,8 +48,8 @@ public: */ JackSynchronizer(JackDevice* device); - virtual void seek(std::shared_ptr<IHandle> handle, float time); - virtual float getPosition(std::shared_ptr<IHandle> handle); + virtual void seek(std::shared_ptr<IHandle> handle, double time); + virtual double getPosition(std::shared_ptr<IHandle> handle); virtual void play(); virtual void stop(); virtual void setSyncCallback(syncFunction function, void* data); |