all repos — mgba @ e6ea94d2296eae963a48a18d009217a38d92bf9b

mGBA Game Boy Advance Emulator

src/platform/sdl/sdl-audio.h (view raw)

 1#ifndef SDL_AUDIO_H
 2#define SDL_AUDIO_H
 3
 4#include "util/common.h"
 5
 6#include <SDL.h>
 7
 8struct GBASDLAudio {
 9	// Input
10	size_t samples;
11
12	// State
13	SDL_AudioSpec desiredSpec;
14	SDL_AudioSpec obtainedSpec;
15	float drift;
16	float ratio;
17
18	struct GBAThread* thread;
19};
20
21bool GBASDLInitAudio(struct GBASDLAudio* context, struct GBAThread* threadContext);
22void GBASDLDeinitAudio(struct GBASDLAudio* context);
23void GBASDLPauseAudio(struct GBASDLAudio* context);
24void GBASDLResumeAudio(struct GBASDLAudio* context);
25
26#endif