X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=audio%2Fsdlaudio.c;h=5d6fc24116c1d95f0e7fa121365e3e07d0fd5040;hb=f3353c6bc3c7ef4ce018aa4faa1b02aa59d9d178;hp=5df173616dcc340aaba23096abb37973ebdc7451;hpb=8869defe624e939a35309deee24f82cf2283d3e8;p=qemu diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c index 5df1736..5d6fc24 100644 --- a/audio/sdlaudio.c +++ b/audio/sdlaudio.c @@ -29,6 +29,8 @@ #ifndef _WIN32 #ifdef __sun__ #define _POSIX_PTHREAD_SEMANTICS 1 +#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) +#include #endif #include #endif @@ -49,7 +51,7 @@ static struct { 1024 }; -struct SDLAudioState { +static struct SDLAudioState { int exit; SDL_mutex *mutex; SDL_sem *sem; @@ -255,7 +257,7 @@ static void sdl_callback (void *opaque, Uint8 *buf, int len) decr = to_mix; while (to_mix) { int chunk = audio_MIN (to_mix, hw->samples - hw->rpos); - st_sample_t *src = hw->mix_buf + hw->rpos; + struct st_sample *src = hw->mix_buf + hw->rpos; /* dolog ("in callback to_mix %d, chunk %d\n", to_mix, chunk); */ hw->clip (buf, src, chunk); @@ -321,7 +323,7 @@ static void sdl_fini_out (HWVoiceOut *hw) sdl_close (&glob_sdl); } -static int sdl_init_out (HWVoiceOut *hw, audsettings_t *as) +static int sdl_init_out (HWVoiceOut *hw, struct audsettings *as) { SDLVoiceOut *sdl = (SDLVoiceOut *) hw; SDLAudioState *s = &glob_sdl; @@ -330,7 +332,7 @@ static int sdl_init_out (HWVoiceOut *hw, audsettings_t *as) int endianess; int err; audfmt_e effective_fmt; - audsettings_t obt_as; + struct audsettings obt_as; shift <<= as->nchannels == 2; @@ -423,7 +425,7 @@ static struct audio_option sdl_options[] = { {NULL, 0, NULL, NULL, NULL, 0} }; -static const struct audio_pcm_ops sdl_pcm_ops = { +static struct audio_pcm_ops sdl_pcm_ops = { sdl_init_out, sdl_fini_out, sdl_run_out,