Supermodel/Src/OSD/Audio.h
Bart Trzynadlowski cf73207c98 - Nik's new decoupled audio code with fixes to minimize overruns.
- VBlank timing: increased to 20% of a frame.
2011-09-12 05:43:37 +00:00

38 lines
773 B
C
Executable file

#ifndef INCLUDED_AUDIO_H
#define INCLUDED_AUDIO_H
/*
* Audio.h
*
* Function-based interface for audio output.
*/
typedef void (*AudioCallbackFPtr)(void *data);
extern void SetAudioCallback(AudioCallbackFPtr callback, void *data);
extern void SetAudioEnabled(bool enabled);
/*
* OpenAudio()
*
* Initializes the audio system.
*/
extern bool OpenAudio();
/*
* OutputAudio(unsigned numSamples, *INT16 leftBuffer, *INT16 rightBuffer)
*
* Sends a chunk of two-channel audio with the given number of samples to the audio system.
*/
extern bool OutputAudio(unsigned numSamples, INT16 *leftBuffer, INT16 *rightBuffer);
/*
* CloseAudio()
*
* Shuts down the audio system.
*/
extern void CloseAudio();
#endif // INCLUDED_AUDIO_H