sdlaudio: remove leftover SDL1.2 code
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-id: 9315afe5-5958-c0b4-ea1e-14769511a9d5@t-online.de Message-Id: <20210110100239.27588-1-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
45240eed4f
commit
ef26632e3a
@ -240,28 +240,24 @@ static void sdl_callback (void *opaque, Uint8 *buf, int len)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SDL_WRAPPER_FUNC(name, ret_type, args_decl, args, fail, unlock) \
|
#define SDL_WRAPPER_FUNC(name, ret_type, args_decl, args) \
|
||||||
static ret_type glue(sdl_, name)args_decl \
|
static ret_type glue(sdl_, name)args_decl \
|
||||||
{ \
|
{ \
|
||||||
ret_type ret; \
|
ret_type ret; \
|
||||||
\
|
\
|
||||||
SDL_LockAudio(); \
|
SDL_LockAudio(); \
|
||||||
\
|
ret = glue(audio_generic_, name)args; \
|
||||||
ret = glue(audio_generic_, name)args; \
|
SDL_UnlockAudio(); \
|
||||||
\
|
\
|
||||||
SDL_UnlockAudio(); \
|
return ret; \
|
||||||
return ret; \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_WRAPPER_FUNC(get_buffer_out, void *, (HWVoiceOut *hw, size_t *size),
|
SDL_WRAPPER_FUNC(get_buffer_out, void *, (HWVoiceOut *hw, size_t *size),
|
||||||
(hw, size), *size = 0, sdl_unlock)
|
(hw, size))
|
||||||
SDL_WRAPPER_FUNC(put_buffer_out, size_t,
|
SDL_WRAPPER_FUNC(put_buffer_out, size_t,
|
||||||
(HWVoiceOut *hw, void *buf, size_t size), (hw, buf, size),
|
(HWVoiceOut *hw, void *buf, size_t size), (hw, buf, size))
|
||||||
/*nothing*/, sdl_unlock_and_post)
|
|
||||||
SDL_WRAPPER_FUNC(write, size_t,
|
SDL_WRAPPER_FUNC(write, size_t,
|
||||||
(HWVoiceOut *hw, void *buf, size_t size), (hw, buf, size),
|
(HWVoiceOut *hw, void *buf, size_t size), (hw, buf, size))
|
||||||
/*nothing*/, sdl_unlock_and_post)
|
|
||||||
|
|
||||||
#undef SDL_WRAPPER_FUNC
|
#undef SDL_WRAPPER_FUNC
|
||||||
|
|
||||||
static void sdl_fini_out (HWVoiceOut *hw)
|
static void sdl_fini_out (HWVoiceOut *hw)
|
||||||
|
Loading…
Reference in New Issue
Block a user