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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-01 13:46:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-01 13:46:07 +0400
commit473292dcd7f0f51b91316fc59cdf7d97d11435a5 (patch)
treedcf13b6deae26524798120712d6eb06e7b31bfd1 /source
parent255a81c3bf845add7acec8b87df7ea221edce283 (diff)
fix for building without audaspace, since pepper merge
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/sound.c12
-rw-r--r--source/blender/editors/sound/sound_ops.c17
2 files changed, 27 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index cdb509ab8e1..50a7b4a7a73 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -760,5 +760,17 @@ void sound_seek_scene(struct bContext *UNUSED(C)) {}
float sound_sync_scene(struct Scene *UNUSED(scene)) { return 0.0f; }
int sound_scene_playing(struct Scene *UNUSED(scene)) { return -1; }
int sound_read_sound_buffer(struct bSound* UNUSED(sound), float* UNUSED(buffer), int UNUSED(length), float UNUSED(start), float UNUSED(end)) { return 0; }
+void sound_read_waveform(struct bSound* sound) { (void)sound; }
+void sound_init_main(struct Main *bmain) { (void)bmain; }
+void sound_set_cfra(int cfra) { (void)cfra; }
+void sound_update_sequencer(struct Main* main, struct bSound* sound) { (void)main; (void)sound; }
+void sound_update_scene(struct Scene* scene) { (void)scene; }
+void sound_update_scene_sound(void* handle, struct bSound* sound) { (void)handle; (void)sound; }
+void sound_update_scene_listener(struct Scene *scene) { (void)scene; }
+void sound_update_fps(struct Scene *scene) { (void)scene; }
+void sound_set_scene_sound_volume(void* handle, float volume, char animated) { (void)handle; (void)volume; (void)animated; }
+void sound_set_scene_sound_pan(void* handle, float pan, char animated) { (void)handle; (void)pan; (void)animated; }
+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; }
#endif // WITH_AUDASPACE
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index e66abffbfd1..70884d47c23 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -221,6 +221,7 @@ void SOUND_OT_open_mono(wmOperatorType *ot)
static int mixdown_exec(bContext *C, wmOperator *op)
{
+#ifdef WITH_AUDASPACE
char path[FILE_MAX];
char filename[FILE_MAX];
Scene *scene;
@@ -254,7 +255,10 @@ static int mixdown_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_ERROR, result);
return OPERATOR_CANCELLED;
}
-
+#else // WITH_AUDASPACE
+ (void)C;
+ (void)op;
+#endif // WITH_AUDASPACE
return OPERATOR_FINISHED;
}
@@ -278,6 +282,7 @@ static int mixdown_draw_check_prop(PropertyRNA *prop)
);
}
+#ifdef WITH_AUDASPACE
static void mixdown_draw(bContext *C, wmOperator *op)
{
static EnumPropertyItem pcm_format_items[] = {
@@ -429,9 +434,11 @@ static void mixdown_draw(bContext *C, wmOperator *op)
/* main draw call */
uiDefAutoButsRNA(layout, &ptr, mixdown_draw_check_prop, '\0');
}
+#endif // WITH_AUDASPACE
void SOUND_OT_mixdown(wmOperatorType *ot)
{
+#ifdef WITH_AUDASPACE
static EnumPropertyItem format_items[] = {
{AUD_FORMAT_U8, "U8", 0, "U8", "8 bit unsigned"},
{AUD_FORMAT_S16, "S16", 0, "S16", "16 bit signed"},
@@ -469,6 +476,8 @@ void SOUND_OT_mixdown(wmOperatorType *ot)
{AUD_CODEC_VORBIS, "VORBIS", 0, "Vorbis", "Xiph.Org Vorbis Codec"},
{0, NULL, 0, NULL, NULL}};
+#endif // WITH_AUDASPACE
+
/* identifiers */
ot->name= "Mixdown";
ot->description= "Mixes the scene's audio to a sound file";
@@ -477,18 +486,22 @@ void SOUND_OT_mixdown(wmOperatorType *ot)
/* api callbacks */
ot->exec= mixdown_exec;
ot->invoke= mixdown_invoke;
- ot->ui= mixdown_draw;
+#ifdef WITH_AUDASPACE
+ ot->ui= mixdown_draw;
+#endif
/* flags */
ot->flag= OPTYPE_REGISTER;
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH);
+#ifdef WITH_AUDASPACE
RNA_def_int(ot->srna, "accuracy", 1024, 1, 16777216, "Accuracy", "Sample accuracy. Important for animation data. The lower the value, the more accurate.", 1, 16777216);
RNA_def_enum(ot->srna, "container", container_items, AUD_CONTAINER_FLAC, "Container", "File format");
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);
+#endif // WITH_AUDASPACE
}
/* ******************************************************* */