src/platform/sdl/sdl-audio.h (view raw)
1/* Copyright (c) 2013-2014 Jeffrey Pfau
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6#ifndef SDL_AUDIO_H
7#define SDL_AUDIO_H
8
9#include "util/common.h"
10
11#include <SDL.h>
12
13struct GBASDLAudio {
14 // Input
15 size_t samples;
16
17 // State
18 SDL_AudioSpec desiredSpec;
19 SDL_AudioSpec obtainedSpec;
20 float drift;
21 float ratio;
22
23 struct GBAThread* thread;
24};
25
26bool GBASDLInitAudio(struct GBASDLAudio* context, struct GBAThread* threadContext);
27void GBASDLDeinitAudio(struct GBASDLAudio* context);
28void GBASDLPauseAudio(struct GBASDLAudio* context);
29void GBASDLResumeAudio(struct GBASDLAudio* context);
30
31#endif