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:
authorJoerg Mueller <nexyon@gmail.com>2012-04-28 17:16:29 +0400
committerJoerg Mueller <nexyon@gmail.com>2012-04-28 17:16:29 +0400
commitef3acaedc1eb530b263e9235d83d853f8282a278 (patch)
tree149e8ca079e8536bb05a175050327607c8e5b0f6 /source/blender/editors/sound/sound_ops.c
parentc91fd5a0bf60a03a404fe9157bbf3fccb40e590b (diff)
Audio:
* Fix for [#31099] Audio in Meta-Strips Plays Beyond Strip Cut * Adding a split files option to the mixdown operator which then renders each channel into a separate file
Diffstat (limited to 'source/blender/editors/sound/sound_ops.c')
-rw-r--r--source/blender/editors/sound/sound_ops.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index c238789446f..49eb85d62b4 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -318,6 +318,7 @@ static int sound_mixdown_exec(bContext *C, wmOperator *op)
char filename[FILE_MAX];
Scene *scene;
Main *bmain;
+ int split;
int bitrate, accuracy;
AUD_DeviceSpecs specs;
@@ -333,6 +334,7 @@ static int sound_mixdown_exec(bContext *C, wmOperator *op)
specs.format = RNA_enum_get(op->ptr, "format");
container = RNA_enum_get(op->ptr, "container");
codec = RNA_enum_get(op->ptr, "codec");
+ split = RNA_boolean_get(op->ptr, "split_channels");
scene = CTX_data_scene(C);
bmain = CTX_data_main(C);
specs.channels = scene->r.ffcodecdata.audio_channels;
@@ -341,8 +343,12 @@ static int sound_mixdown_exec(bContext *C, wmOperator *op)
BLI_strncpy(filename, path, sizeof(filename));
BLI_path_abs(filename, bmain->name);
- result = AUD_mixdown(scene->sound_scene, SFRA * specs.rate / FPS, (EFRA - SFRA) * specs.rate / FPS,
- accuracy, filename, specs, container, codec, bitrate);
+ if(split)
+ result = AUD_mixdown_per_channel(scene->sound_scene, SFRA * specs.rate / FPS, (EFRA - SFRA) * specs.rate / FPS,
+ accuracy, filename, specs, container, codec, bitrate);
+ else
+ result = AUD_mixdown(scene->sound_scene, SFRA * specs.rate / FPS, (EFRA - SFRA) * specs.rate / FPS,
+ accuracy, filename, specs, container, codec, bitrate);
if (result) {
BKE_report(op->reports, RPT_ERROR, result);
@@ -590,6 +596,7 @@ static void SOUND_OT_mixdown(wmOperatorType *ot)
RNA_def_enum(ot->srna, "codec", codec_items, AUD_CODEC_FLAC, "Codec", "Audio Codec");
RNA_def_enum(ot->srna, "format", format_items, AUD_FORMAT_S16, "Format", "Sample format");
RNA_def_int(ot->srna, "bitrate", 192, 32, 512, "Bitrate", "Bitrate in kbit/s", 32, 512);
+ RNA_def_boolean(ot->srna, "split_channels", 0, "Split channels", "Each channel will be rendered into a mono file.");
#endif // WITH_AUDASPACE
}