diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-29 17:41:00 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-29 18:18:11 +0300 |
commit | d140e70c496122915eb5c05aba83153e2e0d7998 (patch) | |
tree | 1e589247d69da64aa7b0e7802319237ec050b5d6 /source/blender/editors/sound | |
parent | 147bd16ed1bb3415b30408b0eab110d0854eadd2 (diff) | |
parent | 295d0c52a26730edc6d4ed1276e4051cce006be5 (diff) |
Merge branch 'master' into temp-ghash-experimentstemp-ghash-experiments
Note that 'store hash' feature was removed for now - to complex to maintain (conflicts)
and relatively easy to re-add if we ever really want this one day.
Conflicts:
source/blender/blenlib/BLI_ghash.h
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenlib/intern/hash_mm2a.c
source/blender/bmesh/tools/bmesh_region_match.c
tests/gtests/blenlib/BLI_ghash_performance_test.cc
tests/gtests/blenlib/BLI_ghash_test.cc
tests/gtests/blenlib/CMakeLists.txt
Diffstat (limited to 'source/blender/editors/sound')
-rw-r--r-- | source/blender/editors/sound/sound_intern.h | 1 | ||||
-rw-r--r-- | source/blender/editors/sound/sound_ops.c | 14 |
2 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/editors/sound/sound_intern.h b/source/blender/editors/sound/sound_intern.h index e8a8ec55ab5..ace173abdee 100644 --- a/source/blender/editors/sound/sound_intern.h +++ b/source/blender/editors/sound/sound_intern.h @@ -32,7 +32,6 @@ #ifndef __SOUND_INTERN_H__ #define __SOUND_INTERN_H__ -struct wmOperatorType; #endif /* __SOUND_INTERN_H__ */ diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index f3c6781b0fa..8a3b48125d0 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -51,6 +51,7 @@ #include "BKE_global.h" #include "BKE_main.h" #include "BKE_report.h" +#include "BKE_library.h" #include "BKE_packedFile.h" #include "BKE_scene.h" #include "BKE_sound.h" @@ -100,13 +101,14 @@ static int sound_open_exec(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); RNA_string_get(op->ptr, "filepath", path); - sound = sound_new_file(bmain, path); + sound = BKE_sound_new_file(bmain, path); if (!op->customdata) sound_open_init(C, op); - if (sound == NULL || sound->playback_handle == NULL) { + if (sound->playback_handle == NULL) { if (op->customdata) MEM_freeN(op->customdata); + BKE_libblock_free(bmain, sound); BKE_report(op->reports, RPT_ERROR, "Unsupported audio format"); return OPERATOR_CANCELLED; } @@ -114,7 +116,7 @@ static int sound_open_exec(bContext *C, wmOperator *op) info = AUD_getInfo(sound->playback_handle); if (info.specs.channels == AUD_CHANNELS_INVALID) { - sound_delete(bmain, sound); + BKE_sound_delete(bmain, sound); if (op->customdata) MEM_freeN(op->customdata); BKE_report(op->reports, RPT_ERROR, "Unsupported audio format"); return OPERATOR_CANCELLED; @@ -122,11 +124,11 @@ static int sound_open_exec(bContext *C, wmOperator *op) if (RNA_boolean_get(op->ptr, "mono")) { sound->flags |= SOUND_FLAGS_MONO; - sound_load(bmain, sound); + BKE_sound_load(bmain, sound); } if (RNA_boolean_get(op->ptr, "cache")) { - sound_cache(sound); + BKE_sound_cache(sound); } /* hook into UI */ @@ -690,7 +692,7 @@ static int sound_pack_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; sound->packedfile = newPackedFile(op->reports, sound->name, ID_BLEND_PATH(bmain, &sound->id)); - sound_load(bmain, sound); + BKE_sound_load(bmain, sound); return OPERATOR_FINISHED; } |