diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-10-06 05:59:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-10-06 05:59:11 +0400 |
commit | 002725d72afd2143437fde556b292e9b427640b2 (patch) | |
tree | 8ffcd8f02b1331b7eaadbc58080d4b8bb1527bdd /source/blender | |
parent | 5d92376ef4d35b81eddff09af2ec665d8df55460 (diff) |
use uint8_t and uint32_t rather then Uint8 and Uint32, (mingw didnt know about Uint's)
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/include/BSE_seqaudio.h | 12 | ||||
-rw-r--r-- | source/blender/src/drawseq.c | 2 | ||||
-rw-r--r-- | source/blender/src/seqaudio.c | 32 |
3 files changed, 25 insertions, 21 deletions
diff --git a/source/blender/include/BSE_seqaudio.h b/source/blender/include/BSE_seqaudio.h index 9b2c21a0817..64aa50c661d 100644 --- a/source/blender/include/BSE_seqaudio.h +++ b/source/blender/include/BSE_seqaudio.h @@ -29,20 +29,24 @@ #ifndef BSE_SEQAUDIO_H #define BSE_SEQAUDIO_H +#ifndef DISABLE_SDL #include "SDL.h" +#endif + /* muha, we don't init (no SDL_main)! */ #ifdef main # undef main #endif #include "DNA_sound_types.h" +#include "BLO_sys_types.h" void audio_mixdown(); void audio_makestream(bSound *sound); -void audiostream_play(Uint32 startframe, Uint32 duration, int mixdown); -void audiostream_fill(Uint8* mixdown, int len); -void audiostream_start(Uint32 frame); -void audiostream_scrub(Uint32 frame); +void audiostream_play(uint32_t startframe, uint32_t duration, int mixdown); +void audiostream_fill(uint8_t* mixdown, int len); +void audiostream_start(uint32_t frame); +void audiostream_scrub(uint32_t frame); void audiostream_stop(void); int audiostream_pos(void); diff --git a/source/blender/src/drawseq.c b/source/blender/src/drawseq.c index d7346a1ed21..d54046a260e 100644 --- a/source/blender/src/drawseq.c +++ b/source/blender/src/drawseq.c @@ -348,7 +348,7 @@ static void drawseqwave(Sequence *seq, float x1, float y1, float x2, float y2, i signed short* s; bSound *sound; - Uint8 *stream; + uint8_t *stream; audio_makestream(seq->sound); if(seq->sound==NULL || seq->sound->stream==NULL) return; diff --git a/source/blender/src/seqaudio.c b/source/blender/src/seqaudio.c index 1e0c8099dea..9b4e3361625 100644 --- a/source/blender/src/seqaudio.c +++ b/source/blender/src/seqaudio.c @@ -86,7 +86,7 @@ #include "blendef.h" -static void audio_fill(void *mixdown, Uint8 *sstream, int len); +static void audio_fill(void *mixdown, uint8_t *sstream, int len); /* ************ GLOBALS ************* */ static int audio_pos; @@ -208,7 +208,7 @@ void audio_mixdown() #endif } -void audiostream_fill(Uint8 *mixdown, int len) +void audiostream_fill(uint8_t *mixdown, int len) { int oldcfra = CFRA; int i; @@ -229,7 +229,7 @@ void audiostream_fill(Uint8 *mixdown, int len) } -static void audio_levels(Uint8 *buf, int len, float db, float facf, float pan) +static void audio_levels(uint8_t *buf, int len, float db, float facf, float pan) { int i; float facl, facr, fac; @@ -294,9 +294,9 @@ void audio_makestream(bSound *sound) #ifndef DISABLE_SDL static void audio_fill_ram_sound(Sequence *seq, void * mixdown, - Uint8 * sstream, int len) + uint8_t * sstream, int len) { - Uint8* cvtbuf; + uint8_t* cvtbuf; bSound* sound; float facf; @@ -312,12 +312,12 @@ static void audio_fill_ram_sound(Sequence *seq, void * mixdown, facf = 1.0; } cvtbuf = malloc(len); - memcpy(cvtbuf, ((Uint8*)sound->stream)+(seq->curpos & (~3)), len); + memcpy(cvtbuf, ((uint8_t*)sound->stream)+(seq->curpos & (~3)), len); audio_levels(cvtbuf, len, seq->level, facf, seq->pan); if (!mixdown) { SDL_MixAudio(sstream, cvtbuf, len, SDL_MIX_MAXVOLUME); } else { - SDL_MixAudio((Uint8*)mixdown, cvtbuf, len, SDL_MIX_MAXVOLUME); + SDL_MixAudio((uint8_t*)mixdown, cvtbuf, len, SDL_MIX_MAXVOLUME); } free(cvtbuf); } @@ -327,10 +327,10 @@ static void audio_fill_ram_sound(Sequence *seq, void * mixdown, #ifndef DISABLE_SDL static void audio_fill_hd_sound(Sequence *seq, - void * mixdown, Uint8 * sstream, + void * mixdown, uint8_t * sstream, int len) { - Uint8* cvtbuf; + uint8_t* cvtbuf; float facf; if ((seq->curpos >= 0) && @@ -354,7 +354,7 @@ static void audio_fill_hd_sound(Sequence *seq, SDL_MixAudio(sstream, cvtbuf, len, SDL_MIX_MAXVOLUME); } else { - SDL_MixAudio((Uint8*)mixdown, + SDL_MixAudio((uint8_t*)mixdown, cvtbuf, len, SDL_MIX_MAXVOLUME); } free(cvtbuf); @@ -365,7 +365,7 @@ static void audio_fill_hd_sound(Sequence *seq, #ifndef DISABLE_SDL static void audio_fill_seq(Sequence * seq, void * mixdown, - Uint8 *sstream, int len, int advance_only) + uint8_t *sstream, int len, int advance_only) { while(seq) { if (seq->type == SEQ_META && @@ -419,7 +419,7 @@ static void audio_fill_seq(Sequence * seq, void * mixdown, #endif #ifndef DISABLE_SDL -static void audio_fill(void *mixdown, Uint8 *sstream, int len) +static void audio_fill(void *mixdown, uint8_t *sstream, int len) { Editing *ed; Sequence *seq; @@ -467,7 +467,7 @@ static int audio_init(SDL_AudioSpec *desired) } #endif -static int audiostream_play_seq(Sequence * seq, Uint32 startframe) +static int audiostream_play_seq(Sequence * seq, uint32_t startframe) { char name[FILE_MAXDIR+FILE_MAXFILE]; int have_sound = 0; @@ -510,7 +510,7 @@ static int audiostream_play_seq(Sequence * seq, Uint32 startframe) return have_sound; } -void audiostream_play(Uint32 startframe, Uint32 duration, int mixdown) +void audiostream_play(uint32_t startframe, uint32_t duration, int mixdown) { #ifndef DISABLE_SDL static SDL_AudioSpec desired; @@ -557,12 +557,12 @@ void audiostream_play(Uint32 startframe, Uint32 duration, int mixdown) #endif } -void audiostream_start(Uint32 frame) +void audiostream_start(uint32_t frame) { audiostream_play(frame, 0, 0); } -void audiostream_scrub(Uint32 frame) +void audiostream_scrub(uint32_t frame) { if (U.mixbufsize) audiostream_play(frame, 4096/U.mixbufsize, 0); } |