diff options
author | Simon Howard | 2007-06-17 18:40:02 +0000 |
---|---|---|
committer | Simon Howard | 2007-06-17 18:40:02 +0000 |
commit | beab4eb58b667a5883166bd1dd7bc33369a005c7 (patch) | |
tree | a6574cd329b3caea7a600ec6ce9184cc79ffb494 /pcsound/pcsound.h | |
parent | 5fc7913741e9f722e31735baea10f635fc18acce (diff) | |
download | chocolate-doom-beab4eb58b667a5883166bd1dd7bc33369a005c7.tar.gz chocolate-doom-beab4eb58b667a5883166bd1dd7bc33369a005c7.tar.bz2 chocolate-doom-beab4eb58b667a5883166bd1dd7bc33369a005c7.zip |
Split i_sound.c into i_sdlsound.c, i_sdlmusic.c, with generic "sound
driver" modules, one for PC speaker and one for digital output.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 913
Diffstat (limited to 'pcsound/pcsound.h')
-rw-r--r-- | pcsound/pcsound.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/pcsound/pcsound.h b/pcsound/pcsound.h index 12a4ffe9..e64796b8 100644 --- a/pcsound/pcsound.h +++ b/pcsound/pcsound.h @@ -26,22 +26,21 @@ #ifndef PCSOUND_H #define PCSOUND_H -#define PCSOUND_8253_FREQUENCY 1193280 - -typedef struct pcsound_driver_s pcsound_driver_t; typedef void (*pcsound_callback_func)(int *duration, int *frequency); -typedef int (*pcsound_init_func)(pcsound_callback_func callback); -typedef void (*pcsound_shutdown_func)(void); -struct pcsound_driver_s -{ - char *name; - pcsound_init_func init_func; - pcsound_shutdown_func shutdown_func; -}; +// Initialise the PC speaker subsystem. The given function is called +// periodically to request more sound data to play. int PCSound_Init(pcsound_callback_func callback_func); + +// Shut down the PC speaker subsystem. + void PCSound_Shutdown(void); +// Set the preferred output sample rate when emulating a PC speaker. +// This must be called before PCSound_Init. + +void PCSound_SetSampleRate(int rate); + #endif /* #ifndef PCSOUND_H */ |