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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-02-28 10:23:28 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-02-28 10:26:16 +0400
commit32d5cc247fc1cf9a71492a26cebf99f9505bb82a (patch)
treed5a4efb5f93474ff044670c37f571e4835346ed5 /source/blender/editors/sound/sound_ops.c
parentba08031783a1aebc4559351454e3de1a9629b37a (diff)
Fix T38768: New "audio" button in 2.70 release does not 'mixdown' audio
Issue was caused by the way how audio output works from audaspace. Now made it much closer to what's happening in ffmpeg.c and writeffmpeg.c. Also fixed issues with incompatible combinations of codecs and formats in mixdown settings.
Diffstat (limited to 'source/blender/editors/sound/sound_ops.c')
-rw-r--r--source/blender/editors/sound/sound_ops.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index 168693db60b..1979379032f 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -476,12 +476,6 @@ static void sound_mixdown_draw(bContext *C, wmOperator *op)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem ac3_format_items[] = {
- {AUD_FORMAT_S16, "S16", 0, "S16", "16 bit signed"},
- {AUD_FORMAT_FLOAT32, "F32", 0, "F32", "32 bit floating point"},
- {0, NULL, 0, NULL, NULL}
- };
-
#ifdef WITH_SNDFILE
static EnumPropertyItem flac_format_items[] = {
{AUD_FORMAT_S16, "S16", 0, "S16", "16 bit signed"},
@@ -527,10 +521,9 @@ static void sound_mixdown_draw(bContext *C, wmOperator *op)
switch (container) {
case AUD_CONTAINER_AC3:
- RNA_def_property_clear_flag(prop_format, PROP_HIDDEN);
- RNA_def_property_enum_items(prop_format, ac3_format_items);
RNA_def_property_enum_items(prop_codec, all_codec_items);
RNA_enum_set(op->ptr, "codec", AUD_CODEC_AC3);
+ RNA_enum_set(op->ptr, "format", AUD_FORMAT_FLOAT32);
break;
case AUD_CONTAINER_FLAC:
RNA_def_property_flag(prop_bitrate, PROP_HIDDEN);
@@ -539,9 +532,8 @@ static void sound_mixdown_draw(bContext *C, wmOperator *op)
#ifdef WITH_SNDFILE
RNA_def_property_clear_flag(prop_format, PROP_HIDDEN);
RNA_def_property_enum_items(prop_format, flac_format_items);
-#else
- RNA_enum_set(op->ptr, "format", AUD_FORMAT_S16);
#endif
+ RNA_enum_set(op->ptr, "format", AUD_FORMAT_S16);
break;
case AUD_CONTAINER_MATROSKA:
RNA_def_property_clear_flag(prop_codec, PROP_HIDDEN);
@@ -552,8 +544,7 @@ static void sound_mixdown_draw(bContext *C, wmOperator *op)
RNA_enum_set(op->ptr, "format", AUD_FORMAT_S16);
break;
case AUD_CODEC_AC3:
- RNA_def_property_enum_items(prop_format, ac3_format_items);
- RNA_def_property_clear_flag(prop_format, PROP_HIDDEN);
+ RNA_enum_set(op->ptr, "format", AUD_FORMAT_FLOAT32);
break;
case AUD_CODEC_FLAC:
RNA_def_property_flag(prop_bitrate, PROP_HIDDEN);
@@ -565,6 +556,7 @@ static void sound_mixdown_draw(bContext *C, wmOperator *op)
case AUD_CODEC_MP3:
RNA_def_property_enum_items(prop_format, mp3_format_items);
RNA_def_property_clear_flag(prop_format, PROP_HIDDEN);
+ RNA_enum_set(op->ptr, "format", AUD_FORMAT_S16);
break;
case AUD_CODEC_PCM:
RNA_def_property_flag(prop_bitrate, PROP_HIDDEN);
@@ -589,11 +581,13 @@ static void sound_mixdown_draw(bContext *C, wmOperator *op)
RNA_def_property_enum_items(prop_format, mp3_format_items);
RNA_def_property_enum_items(prop_codec, all_codec_items);
RNA_enum_set(op->ptr, "codec", AUD_CODEC_MP3);
+ RNA_enum_set(op->ptr, "format", AUD_FORMAT_S16);
break;
case AUD_CONTAINER_OGG:
RNA_def_property_clear_flag(prop_codec, PROP_HIDDEN);
RNA_def_property_enum_items(prop_codec, ogg_codec_items);
RNA_enum_set(op->ptr, "format", AUD_FORMAT_S16);
+ RNA_enum_set(op->ptr, "codec", AUD_CODEC_VORBIS);
break;
case AUD_CONTAINER_WAV:
RNA_def_property_flag(prop_bitrate, PROP_HIDDEN);