diff options
Diffstat (limited to 'source/blender/editors/sound')
-rw-r--r-- | source/blender/editors/sound/CMakeLists.txt | 2 | ||||
-rw-r--r-- | source/blender/editors/sound/sound_ops.c | 19 |
2 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/editors/sound/CMakeLists.txt b/source/blender/editors/sound/CMakeLists.txt index 535cd579030..9efdf11e8d7 100644 --- a/source/blender/editors/sound/CMakeLists.txt +++ b/source/blender/editors/sound/CMakeLists.txt @@ -39,7 +39,7 @@ set(SRC ) if(WITH_AUDASPACE) - add_definitions(${AUDASPACE_DEFINITIONS}) + add_definitions(-DWITH_AUDASPACE) list(APPEND INC_SYS ${AUDASPACE_C_INCLUDE_DIRS} diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 5d39bcb77c0..558cab760e0 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -49,13 +49,13 @@ #include "BKE_context.h" #include "BKE_fcurve.h" #include "BKE_global.h" -#include "BKE_main.h" -#include "BKE_report.h" #include "BKE_library.h" +#include "BKE_main.h" #include "BKE_packedFile.h" +#include "BKE_report.h" #include "BKE_scene.h" -#include "BKE_sound.h" #include "BKE_sequencer.h" +#include "BKE_sound.h" #include "RNA_access.h" #include "RNA_define.h" @@ -67,7 +67,7 @@ #include "WM_types.h" #ifdef WITH_AUDASPACE -# include AUD_SPECIAL_H +# include <AUD_Special.h> #endif #include "ED_sound.h" @@ -108,7 +108,7 @@ static int sound_open_exec(bContext *C, wmOperator *op) if (sound->playback_handle == NULL) { if (op->customdata) MEM_freeN(op->customdata); - BKE_libblock_free(bmain, sound); + BKE_id_free(bmain, sound); BKE_report(op->reports, RPT_ERROR, "Unsupported audio format"); return OPERATOR_CANCELLED; } @@ -116,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) { - BKE_libblock_free(bmain, sound); + BKE_id_free(bmain, sound); if (op->customdata) MEM_freeN(op->customdata); BKE_report(op->reports, RPT_ERROR, "Unsupported audio format"); return OPERATOR_CANCELLED; @@ -310,6 +310,7 @@ static int sound_bake_animation_exec(bContext *C, wmOperator *UNUSED(op)) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); + struct Depsgraph *depsgraph = CTX_data_depsgraph(C); int oldfra = scene->r.cfra; int cfra; @@ -317,11 +318,11 @@ static int sound_bake_animation_exec(bContext *C, wmOperator *UNUSED(op)) for (cfra = (scene->r.sfra > 0) ? (scene->r.sfra - 1) : 0; cfra <= scene->r.efra + 1; cfra++) { scene->r.cfra = cfra; - BKE_scene_update_for_newframe(bmain->eval_ctx, bmain, scene, scene->lay); + BKE_scene_graph_update_for_newframe(depsgraph, bmain); } scene->r.cfra = oldfra; - BKE_scene_update_for_newframe(bmain->eval_ctx, bmain, scene, scene->lay); + BKE_scene_graph_update_for_newframe(depsgraph, bmain); return OPERATOR_FINISHED; } @@ -633,7 +634,7 @@ static void sound_mixdown_draw(bContext *C, wmOperator *op) RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr); /* main draw call */ - uiDefAutoButsRNA(layout, &ptr, sound_mixdown_draw_check_prop, NULL, '\0'); + uiDefAutoButsRNA(layout, &ptr, sound_mixdown_draw_check_prop, NULL, UI_BUT_LABEL_ALIGN_NONE, false); } #endif // WITH_AUDASPACE |