diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-27 11:19:54 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-27 11:19:54 +0400 |
commit | 31eee77a4503ac38c3d9d96a5f77df86648c700c (patch) | |
tree | 6b7454f75cf78ff485e9b28f5f768daad9cd69b1 /source/blender/blenkernel/intern/sound.c | |
parent | 91b2b970ade21a70c3c7289cefff6c2cbb2059cd (diff) |
Fix #33518: Jack sync doesn't work in 2.64, 2.64 or 2.65 stable versions
Added new build option WITH_JACK_DYNLOAD for CMake and
WITH_BF_JACK_DYNLOAD for SCons, which means there'll be
no build-time linking against libjack and getting symbols
from libjack will happen runtime using dlopen and dlsym
tricks.
Alternative would be to use weak linking, but it'll require
having wrapper for preloading libjack.
This new options are disabled by default and they only
intended to be used on linux. Other platforms shall not
be using this and there shall be no functional changes
on non-linux platforms at all.
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index af9d21d8cbc..feff8f95fd7 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -172,7 +172,7 @@ void sound_force_device(int device) void sound_init_once(void) { AUD_initOnce(); - atexit(sound_exit); + atexit(sound_exit_once); } void sound_init(struct Main *bmain) @@ -221,6 +221,12 @@ void sound_exit(void) AUD_exit(); } +void sound_exit_once(void) +{ + AUD_exit(); + AUD_exitOnce(); +} + // XXX unused currently #if 0 bSound *sound_new_buffer(struct Main *bmain, bSound *source) @@ -766,6 +772,11 @@ float sound_get_length(bSound *sound) return info.length; } +int sound_is_jack_supported(void) +{ + return AUD_isJackSupported(); +} + #else // WITH_AUDASPACE #include "BLI_utildefines.h" @@ -775,6 +786,7 @@ void sound_force_device(int UNUSED(device)) {} void sound_init_once(void) {} void sound_init(struct Main *UNUSED(bmain)) {} void sound_exit(void) {} +void sound_exit_once(void) {} void sound_cache(struct bSound *UNUSED(sound)) { } void sound_delete_cache(struct bSound *UNUSED(sound)) {} void sound_load(struct Main *UNUSED(bmain), struct bSound *UNUSED(sound)) {} @@ -807,4 +819,5 @@ void sound_set_scene_sound_pan(void *handle, float pan, char animated) { (void)h void sound_set_scene_volume(struct Scene *scene, float volume) { (void)scene; (void)volume; } void sound_set_scene_sound_pitch(void *handle, float pitch, char animated) { (void)handle; (void)pitch; (void)animated; } float sound_get_length(struct bSound *sound) { (void)sound; return 0; } +int sound_is_jack_supported(void) { return 0; } #endif // WITH_AUDASPACE |