mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-27 02:32:02 -04:00
3da61df355
This reverts commit b836f2198c.
35 lines
915 B
C
35 lines
915 B
C
#pragma once
|
|
|
|
#include "psx_sdl.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef void (SDLCALL *PsxSdlAudioCallback)(void *userdata, Uint8 *stream, int len);
|
|
|
|
typedef struct PsxSdlAudioSpec {
|
|
int freq;
|
|
SDL_AudioFormat format;
|
|
Uint8 channels;
|
|
Uint16 samples;
|
|
int allow_frequency_change;
|
|
PsxSdlAudioCallback callback;
|
|
void *userdata;
|
|
} PsxSdlAudioSpec;
|
|
|
|
SDL_AudioDeviceID psx_sdl_audio_open(
|
|
const PsxSdlAudioSpec *want, PsxSdlAudioSpec *have);
|
|
int psx_sdl_audio_resume(SDL_AudioDeviceID device);
|
|
void psx_sdl_audio_close(SDL_AudioDeviceID device);
|
|
void psx_sdl_audio_clear(SDL_AudioDeviceID device);
|
|
Uint32 psx_sdl_audio_queued_size(SDL_AudioDeviceID device);
|
|
int psx_sdl_audio_queue(
|
|
SDL_AudioDeviceID device, const void *data, Uint32 bytes);
|
|
void psx_sdl_audio_lock(SDL_AudioDeviceID device);
|
|
void psx_sdl_audio_unlock(SDL_AudioDeviceID device);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|