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:
Diffstat (limited to 'source/blender/src/seqaudio.c')
-rw-r--r--source/blender/src/seqaudio.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/src/seqaudio.c b/source/blender/src/seqaudio.c
index 7c27f32c242..2c86ac92c7f 100644
--- a/source/blender/src/seqaudio.c
+++ b/source/blender/src/seqaudio.c
@@ -27,6 +27,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
+
#include <math.h>
#include <stdlib.h>
#include <string.h>
@@ -118,6 +119,7 @@ void makewavstring (char *string)
void audio_mixdown()
{
+#ifndef DISABLE_SDL
int file, c, totlen, totframe, i, oldcfra;
char *buf;
@@ -203,6 +205,7 @@ void audio_mixdown()
MEM_freeN(buf);
return;
+#endif
}
void audiostream_fill(Uint8 *mixdown, int len)
@@ -211,7 +214,7 @@ void audiostream_fill(Uint8 *mixdown, int len)
int i;
memset(mixdown, 0, len);
-
+#ifndef DISABLE_SDL
for (i = 0; i < len; i += 64) {
CFRA = (int) ( ((float)(audio_pos-64)
/( G.scene->audio.mixrate*4 ))
@@ -222,6 +225,7 @@ void audiostream_fill(Uint8 *mixdown, int len)
}
CFRA = oldcfra;
+#endif
}
@@ -288,6 +292,7 @@ void audio_makestream(bSound *sound)
}
}
+#ifndef DISABLE_SDL
static void audio_fill_ram_sound(Sequence *seq, void * mixdown,
Uint8 * sstream, int len)
{
@@ -318,7 +323,9 @@ static void audio_fill_ram_sound(Sequence *seq, void * mixdown,
}
seq->curpos += len;
}
+#endif
+#ifndef DISABLE_SDL
static void audio_fill_hd_sound(Sequence *seq,
void * mixdown, Uint8 * sstream,
int len)
@@ -354,7 +361,9 @@ static void audio_fill_hd_sound(Sequence *seq,
}
seq->curpos += len;
}
+#endif
+#ifndef DISABLE_SDL
static void audio_fill_seq(Sequence * seq, void * mixdown,
Uint8 *sstream, int len, int advance_only)
{
@@ -407,7 +416,9 @@ static void audio_fill_seq(Sequence * seq, void * mixdown,
seq = seq->next;
}
}
+#endif
+#ifndef DISABLE_SDL
void audio_fill(void *mixdown, Uint8 *sstream, int len)
{
Editing *ed;
@@ -427,7 +438,9 @@ void audio_fill(void *mixdown, Uint8 *sstream, int len)
}
}
}
+#endif
+#ifndef DISABLE_SDL
static int audio_init(SDL_AudioSpec *desired)
{
SDL_AudioSpec *obtained, *hardware_spec;
@@ -452,6 +465,7 @@ static int audio_init(SDL_AudioSpec *desired)
SDL_PauseAudio(0);
return 1;
}
+#endif
static int audiostream_play_seq(Sequence * seq, Uint32 startframe)
{
@@ -498,6 +512,7 @@ static int audiostream_play_seq(Sequence * seq, Uint32 startframe)
void audiostream_play(Uint32 startframe, Uint32 duration, int mixdown)
{
+#ifndef DISABLE_SDL
static SDL_AudioSpec desired;
Editing *ed;
int have_sound = 0;
@@ -539,6 +554,7 @@ void audiostream_play(Uint32 startframe, Uint32 duration, int mixdown)
SDL_PauseAudio(0);
audio_playing++;
}
+#endif
}
void audiostream_start(Uint32 frame)
@@ -553,8 +569,10 @@ void audiostream_scrub(Uint32 frame)
void audiostream_stop(void)
{
+#ifndef DISABLE_SDL
SDL_PauseAudio(1);
audio_playing=0;
+#endif
}
int audiostream_pos(void)