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/bindings/C | |
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/bindings/C')
-rw-r--r-- | extern/audaspace/bindings/C/AUD_Device.cpp | 4 | ||||
-rw-r--r-- | extern/audaspace/bindings/C/AUD_Device.h | 4 | ||||
-rw-r--r-- | extern/audaspace/bindings/C/AUD_DynamicMusic.cpp | 6 | ||||
-rw-r--r-- | extern/audaspace/bindings/C/AUD_DynamicMusic.h | 6 | ||||
-rw-r--r-- | extern/audaspace/bindings/C/AUD_Handle.cpp | 4 | ||||
-rw-r--r-- | extern/audaspace/bindings/C/AUD_Handle.h | 4 | ||||
-rw-r--r-- | extern/audaspace/bindings/C/AUD_Sequence.cpp | 4 | ||||
-rw-r--r-- | extern/audaspace/bindings/C/AUD_Sequence.h | 4 | ||||
-rw-r--r-- | extern/audaspace/bindings/C/AUD_Special.cpp | 4 | ||||
-rw-r--r-- | extern/audaspace/bindings/C/AUD_Special.h | 4 |
10 files changed, 22 insertions, 22 deletions
diff --git a/extern/audaspace/bindings/C/AUD_Device.cpp b/extern/audaspace/bindings/C/AUD_Device.cpp index 441f228deac..d4643094bc2 100644 --- a/extern/audaspace/bindings/C/AUD_Device.cpp +++ b/extern/audaspace/bindings/C/AUD_Device.cpp @@ -290,14 +290,14 @@ AUD_API AUD_Device* AUD_Device_getCurrent() return new AUD_Device(device); } -AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, float time) +AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, double time) { auto synchronizer = DeviceManager::getDevice()->getSynchronizer(); if(synchronizer) synchronizer->seek(*reinterpret_cast<std::shared_ptr<IHandle>*>(handle), time); } -AUD_API float AUD_getSynchronizerPosition(AUD_Handle* handle) +AUD_API double AUD_getSynchronizerPosition(AUD_Handle* handle) { auto synchronizer = DeviceManager::getDevice()->getSynchronizer(); if(synchronizer) diff --git a/extern/audaspace/bindings/C/AUD_Device.h b/extern/audaspace/bindings/C/AUD_Device.h index 0dfa21f0660..05e004a17db 100644 --- a/extern/audaspace/bindings/C/AUD_Device.h +++ b/extern/audaspace/bindings/C/AUD_Device.h @@ -221,14 +221,14 @@ extern AUD_API AUD_Device* AUD_Device_getCurrent(); * \param handle Playback handle. * \param time Time in seconds to seek to. */ -extern AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, float time); +extern AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, double time); /** * Returns the current sound scene playback time. * \param handle Playback handle. * \return The playback time in seconds. */ -extern AUD_API float AUD_getSynchronizerPosition(AUD_Handle* handle); +extern AUD_API double AUD_getSynchronizerPosition(AUD_Handle* handle); /** * Starts the playback of jack transport if possible. diff --git a/extern/audaspace/bindings/C/AUD_DynamicMusic.cpp b/extern/audaspace/bindings/C/AUD_DynamicMusic.cpp index bb7a129dde3..62e626cdc6c 100644 --- a/extern/audaspace/bindings/C/AUD_DynamicMusic.cpp +++ b/extern/audaspace/bindings/C/AUD_DynamicMusic.cpp @@ -101,14 +101,14 @@ AUD_API int AUD_DynamicMusic_pause(AUD_DynamicMusic* player) return (*player)->pause(); } -AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, float position) +AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, double position) { assert(player); return (*player)->seek(position); } -AUD_API float AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player) +AUD_API double AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player) { assert(player); @@ -141,4 +141,4 @@ AUD_API int AUD_DynamicMusic_stop(AUD_DynamicMusic* player) assert(player); return (*player)->stop(); -}
\ No newline at end of file +} diff --git a/extern/audaspace/bindings/C/AUD_DynamicMusic.h b/extern/audaspace/bindings/C/AUD_DynamicMusic.h index c362479591e..b8b78e57b55 100644 --- a/extern/audaspace/bindings/C/AUD_DynamicMusic.h +++ b/extern/audaspace/bindings/C/AUD_DynamicMusic.h @@ -103,14 +103,14 @@ extern AUD_API int AUD_DynamicMusic_pause(AUD_DynamicMusic* player); * \param position The new position from which to play back, in seconds. * \return 0 if the seeking wasn't possible. */ -extern AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, float position); +extern AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, double position); /** * Retrieves the position of the current scene of a dynamic music player. * \param player The DynamicMusic object. * \return The position of the current playing scene. */ -extern AUD_API float AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player); +extern AUD_API double AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player); /** * Retrieves the volume of the current scene of a dynamic music player. @@ -142,4 +142,4 @@ extern AUD_API int AUD_DynamicMusic_stop(AUD_DynamicMusic* player); #ifdef __cplusplus } -#endif
\ No newline at end of file +#endif diff --git a/extern/audaspace/bindings/C/AUD_Handle.cpp b/extern/audaspace/bindings/C/AUD_Handle.cpp index 265c7bf08d2..88d46d635e3 100644 --- a/extern/audaspace/bindings/C/AUD_Handle.cpp +++ b/extern/audaspace/bindings/C/AUD_Handle.cpp @@ -259,13 +259,13 @@ AUD_API int AUD_Handle_setPitch(AUD_Handle* handle, float value) return (*handle)->setPitch(value); } -AUD_API float AUD_Handle_getPosition(AUD_Handle* handle) +AUD_API double AUD_Handle_getPosition(AUD_Handle* handle) { assert(handle); return (*handle)->getPosition(); } -AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, float value) +AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, double value) { assert(handle); return (*handle)->seek(value); diff --git a/extern/audaspace/bindings/C/AUD_Handle.h b/extern/audaspace/bindings/C/AUD_Handle.h index 27cbd251de5..2182346c451 100644 --- a/extern/audaspace/bindings/C/AUD_Handle.h +++ b/extern/audaspace/bindings/C/AUD_Handle.h @@ -211,14 +211,14 @@ extern AUD_API int AUD_Handle_setPitch(AUD_Handle* handle, float value); * param handle The handle to get the position from. * return The position of the handle. */ -extern AUD_API float AUD_Handle_getPosition(AUD_Handle* handle); +extern AUD_API double AUD_Handle_getPosition(AUD_Handle* handle); /** * Sets the position of a handle. * param handle The handle to set the position from. * param value The new position to set. */ -extern AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, float value); +extern AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, double value); /** * Retrieves the relative of a handle. diff --git a/extern/audaspace/bindings/C/AUD_Sequence.cpp b/extern/audaspace/bindings/C/AUD_Sequence.cpp index d278cb148a1..e3f88629657 100644 --- a/extern/audaspace/bindings/C/AUD_Sequence.cpp +++ b/extern/audaspace/bindings/C/AUD_Sequence.cpp @@ -41,7 +41,7 @@ AUD_API void AUD_Sequence_free(AUD_Sound* sequence) delete sequence; } -AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, float begin, float end, float skip) +AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, double begin, double end, double skip) { if(!sound) return new AUD_SequenceEntry(((Sequence *)sequence->get())->add(AUD_Sound(), begin, end, skip)); @@ -160,7 +160,7 @@ AUD_API void AUD_Sequence_setSpeedOfSound(AUD_Sound* sequence, float value) -AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, float begin, float end, float skip) +AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, double begin, double end, double skip) { (*entry)->move(begin, end, skip); } diff --git a/extern/audaspace/bindings/C/AUD_Sequence.h b/extern/audaspace/bindings/C/AUD_Sequence.h index 668960c7d50..bdf1a61a2de 100644 --- a/extern/audaspace/bindings/C/AUD_Sequence.h +++ b/extern/audaspace/bindings/C/AUD_Sequence.h @@ -55,7 +55,7 @@ extern AUD_API void AUD_Sequence_free(AUD_Sound* sequence); * \param skip How much seconds should be skipped at the beginning. * \return The entry added. */ -extern AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, float begin, float end, float skip); +extern AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, double begin, double end, double skip); /** * Removes an entry from the scene. @@ -167,7 +167,7 @@ extern AUD_API void AUD_Sequence_setSpeedOfSound(AUD_Sound* sequence, float valu * \param end The new end time or a negative value if unknown. * \param skip How many seconds to skip at the beginning. */ -extern AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, float begin, float end, float skip); +extern AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, double begin, double end, double skip); /** * Writes animation data to a sequenced entry. diff --git a/extern/audaspace/bindings/C/AUD_Special.cpp b/extern/audaspace/bindings/C/AUD_Special.cpp index 30148fa1487..c7155276a30 100644 --- a/extern/audaspace/bindings/C/AUD_Special.cpp +++ b/extern/audaspace/bindings/C/AUD_Special.cpp @@ -175,7 +175,7 @@ static void pauseSound(AUD_Handle* handle) (*handle)->pause(); } -AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, float seconds) +AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, double seconds) { auto device = DeviceManager::getDevice(); @@ -336,7 +336,7 @@ AUD_API const char* AUD_mixdown_per_channel(AUD_Sound* sound, unsigned int start } } -AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, float start) +AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, double start) { try { diff --git a/extern/audaspace/bindings/C/AUD_Special.h b/extern/audaspace/bindings/C/AUD_Special.h index ab79ae915a2..9faf9e4ee74 100644 --- a/extern/audaspace/bindings/C/AUD_Special.h +++ b/extern/audaspace/bindings/C/AUD_Special.h @@ -45,7 +45,7 @@ extern AUD_API float* AUD_readSoundBuffer(const char* filename, float low, float * \param seconds The time in seconds. * \return The silence handle. */ -extern AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, float seconds); +extern AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, double seconds); /** * Reads a sound into a buffer for drawing at a specific sampling rate. @@ -101,7 +101,7 @@ extern AUD_API const char* AUD_mixdown_per_channel(AUD_Sound* sound, unsigned in * \param start The start time of the mixdown in the sound scene. * \return The read device for the mixdown. */ -extern AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, float start); +extern AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, double start); /** * Initializes audio routines (FFMPEG/JACK if it is enabled). |