Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/audaspace')
-rw-r--r--intern/audaspace/CMakeLists.txt2
-rw-r--r--intern/audaspace/intern/AUD_C-API.cpp49
-rw-r--r--intern/audaspace/intern/AUD_C-API.h2
3 files changed, 11 insertions, 42 deletions
diff --git a/intern/audaspace/CMakeLists.txt b/intern/audaspace/CMakeLists.txt
index 7fecb1a48a7..b3682a77875 100644
--- a/intern/audaspace/CMakeLists.txt
+++ b/intern/audaspace/CMakeLists.txt
@@ -164,6 +164,8 @@ set(SRC
intern/AUD_SequencerHandle.h
intern/AUD_SequencerReader.cpp
intern/AUD_SequencerReader.h
+ intern/AUD_Set.cpp
+ intern/AUD_Set.h
intern/AUD_SilenceFactory.cpp
intern/AUD_SilenceFactory.h
intern/AUD_SilenceReader.cpp
diff --git a/intern/audaspace/intern/AUD_C-API.cpp b/intern/audaspace/intern/AUD_C-API.cpp
index 48a3c7b2ded..341f1cd3f6b 100644
--- a/intern/audaspace/intern/AUD_C-API.cpp
+++ b/intern/audaspace/intern/AUD_C-API.cpp
@@ -41,7 +41,6 @@
# include "AUD_PyAPI.h"
#endif
-#include <set>
#include <cstdlib>
#include <cstring>
#include <cmath>
@@ -814,10 +813,9 @@ int AUD_Device_read(AUD_Device *device, data_t *buffer, int length)
void AUD_Device_free(AUD_Device *device)
{
- assert(device);
-
try {
- delete device;
+ if(device != &AUD_device)
+ delete device;
}
catch(AUD_Exception&)
{
@@ -1225,44 +1223,6 @@ void AUD_Handle_free(AUD_Handle *handle)
delete handle;
}
-void *AUD_createSet()
-{
- return new std::set<void *>();
-}
-
-void AUD_destroySet(void *set)
-{
- delete reinterpret_cast<std::set<void *>*>(set);
-}
-
-char AUD_removeSet(void *set, void *entry)
-{
- if (set)
- return reinterpret_cast<std::set<void *>*>(set)->erase(entry);
- return 0;
-}
-
-void AUD_addSet(void *set, void *entry)
-{
- if (entry)
- reinterpret_cast<std::set<void *>*>(set)->insert(entry);
-}
-
-void *AUD_getSet(void *set)
-{
- if (set) {
- std::set<void *>* rset = reinterpret_cast<std::set<void *>*>(set);
- if (!rset->empty()) {
- std::set<void *>::iterator it = rset->begin();
- void *result = *it;
- rset->erase(it);
- return result;
- }
- }
-
- return NULL;
-}
-
const char *AUD_mixdown(AUD_Sound *sound, unsigned int start, unsigned int length, unsigned int buffersize, const char *filename, AUD_DeviceSpecs specs, AUD_Container format, AUD_Codec codec, unsigned int bitrate)
{
try {
@@ -1347,6 +1307,11 @@ AUD_Device *AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound *sequencer, f
}
}
+AUD_Device *AUD_Device_getCurrent(void)
+{
+ return &AUD_device;
+}
+
int AUD_isJackSupported(void)
{
#ifdef WITH_JACK
diff --git a/intern/audaspace/intern/AUD_C-API.h b/intern/audaspace/intern/AUD_C-API.h
index f53dfcefedd..bdbe751b140 100644
--- a/intern/audaspace/intern/AUD_C-API.h
+++ b/intern/audaspace/intern/AUD_C-API.h
@@ -811,6 +811,8 @@ extern void *AUD_getPythonSound(AUD_Sound *sound);
extern AUD_Sound *AUD_getSoundFromPython(void *sound);
#endif
+extern AUD_Device *AUD_Device_getCurrent(void);
+
extern int AUD_isJackSupported(void);
#ifdef __cplusplus