diff options
author | Jörg Müller <nexyon@gmail.com> | 2014-03-04 16:44:15 +0400 |
---|---|---|
committer | Jörg Müller <nexyon@gmail.com> | 2015-07-28 15:01:52 +0300 |
commit | 733073550f61cf4fbbe21aab33e9271915325109 (patch) | |
tree | a182ced91bb592815c097abf572bba999a9e8cdc /source/blender/blenkernel/intern/sound.c | |
parent | 96dd213e7ecabeffc682aee40b4102296ab062de (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/intern/sound.c')
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 30 |
1 files changed, 21 insertions, 9 deletions
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 */ |