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:
authorJörg Müller <nexyon@gmail.com>2014-03-04 16:44:15 +0400
committerJörg Müller <nexyon@gmail.com>2015-07-28 15:01:52 +0300
commit733073550f61cf4fbbe21aab33e9271915325109 (patch)
treea182ced91bb592815c097abf572bba999a9e8cdc /source/blender/blenkernel
parent96dd213e7ecabeffc682aee40b4102296ab062de (diff)
Audaspace: use standalone library.
- Added the cmake configuration option WITH_EXTERNAL_AUDASPACE. - Fixes to build without standalone library as well.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_sound.h8
-rw-r--r--source/blender/blenkernel/CMakeLists.txt7
-rw-r--r--source/blender/blenkernel/intern/blender.c2
-rw-r--r--source/blender/blenkernel/intern/nla.c6
-rw-r--r--source/blender/blenkernel/intern/sequencer.c6
-rw-r--r--source/blender/blenkernel/intern/sound.c30
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c7
7 files changed, 51 insertions, 15 deletions
diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h
index 819b49da8e9..7d2d23e1d39 100644
--- a/source/blender/blenkernel/BKE_sound.h
+++ b/source/blender/blenkernel/BKE_sound.h
@@ -35,6 +35,12 @@
#define SOUND_WAVE_SAMPLES_PER_SECOND 250
+#ifdef WITH_AUDASPACE
+# ifdef WITH_EXTERNAL_AUDASPACE
+# include <audaspace/AUD_Device.h>
+# endif
+#endif
+
struct bSound;
struct Main;
struct Sequence;
@@ -75,7 +81,7 @@ void BKE_sound_load(struct Main *main, struct bSound *sound);
void BKE_sound_free(struct bSound *sound);
-#ifdef __AUD_C_API_H__
+#if defined(__AUD_C_API_H__) || defined(WITH_EXTERNAL_AUDASPACE)
AUD_Device *BKE_sound_mixdown(struct Scene *scene, AUD_DeviceSpecs specs, int start, float volume);
#endif
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 349d1303da3..dd5fcafd964 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -315,6 +315,13 @@ if(WITH_AUDASPACE)
../../../intern/audaspace/intern
)
add_definitions(-DWITH_AUDASPACE)
+
+ if(WITH_EXTERNAL_AUDASPACE)
+ add_definitions(-DWITH_EXTERNAL_AUDASPACE)
+ list(APPEND INC_SYS
+ ${CAUDASPACE_INCLUDE_DIRS}
+ )
+ endif()
endif()
if(WITH_BULLET)
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 37bd9c5db5c..0923ac7e743 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -309,8 +309,6 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
CTX_data_main_set(C, G.main);
- BKE_sound_init_main(G.main);
-
if (bfd->user) {
/* only here free userdef themes... */
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 1ad6446eb05..25629e7db94 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -59,7 +59,11 @@
#include "BKE_library.h"
#ifdef WITH_AUDASPACE
-# include "AUD_C-API.h"
+# ifdef WITH_EXTERNAL_AUDASPACE
+# include <audaspace/AUD_Special.h>
+# else
+# include "AUD_C-API.h"
+# endif
#endif
#include "RNA_access.h"
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index db07344ee93..b087d809e82 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -88,7 +88,11 @@
#include "BKE_sound.h"
#ifdef WITH_AUDASPACE
-# include "AUD_C-API.h"
+# ifdef WITH_EXTERNAL_AUDASPACE
+# include <audaspace/AUD_Special.h>
+# else
+# include "AUD_C-API.h"
+# endif
#endif
static ImBuf *seq_render_strip_stack(const SeqRenderData *context, ListBase *seqbasep, float cfra, int chanshown);
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 3accf2119a4..0eaae45c008 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -48,7 +48,15 @@
#include "DNA_speaker_types.h"
#ifdef WITH_AUDASPACE
-# include "AUD_C-API.h"
+# ifdef WITH_EXTERNAL_AUDASPACE
+# include <audaspace/AUD_Sound.h>
+# include <audaspace/AUD_Sequence.h>
+# include <audaspace/AUD_Handle.h>
+# include <audaspace/AUD_Special.h>
+# include "AUD_Set.h"
+# else
+# include "AUD_C-API.h"
+# endif
#endif
#include "BKE_global.h"
@@ -150,13 +158,13 @@ static void sound_sync_callback(void *data, int mode, float time)
int BKE_sound_define_from_str(const char *str)
{
if (BLI_strcaseeq(str, "NULL"))
- return AUD_NULL_DEVICE;
+ return 0;
if (BLI_strcaseeq(str, "SDL"))
- return AUD_SDL_DEVICE;
+ return 1;
if (BLI_strcaseeq(str, "OPENAL"))
- return AUD_OPENAL_DEVICE;
+ return 2;
if (BLI_strcaseeq(str, "JACK"))
- return AUD_JACK_DEVICE;
+ return 3;
return -1;
}
@@ -189,13 +197,13 @@ void BKE_sound_init(struct Main *bmain)
switch(device)
{
- case AUD_SDL_DEVICE:
+ case 1:
device_name = "SDL";
break;
- case AUD_OPENAL_DEVICE:
+ case 2:
device_name = "OpenAL";
break;
- case AUD_JACK_DEVICE:
+ case 3:
device_name = "Jack";
break;
default:
@@ -204,7 +212,7 @@ void BKE_sound_init(struct Main *bmain)
}
if (buffersize < 128)
- buffersize = AUD_DEFAULT_BUFFER_SIZE;
+ buffersize = 1024;
if (specs.rate < AUD_RATE_8000)
specs.rate = AUD_RATE_44100;
@@ -821,7 +829,11 @@ float BKE_sound_get_length(bSound *sound)
bool BKE_sound_is_jack_supported(void)
{
+#ifdef WITH_EXTERNAL_AUDASPACE
+ return 1;
+#else
return (bool)AUD_isJackSupported();
+#endif
}
#else /* WITH_AUDASPACE */
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index af71f19c226..af33e688dc4 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -45,7 +45,12 @@
#include "BLI_blenlib.h"
#ifdef WITH_AUDASPACE
-# include "AUD_C-API.h"
+# ifdef WITH_EXTERNAL_AUDASPACE
+# include <audaspace/AUD_Device.h>
+# include <audaspace/AUD_Special.h>
+# else
+# include "AUD_C-API.h"
+# endif
#endif
#include "BLI_utildefines.h"