diff options
author | Simon Howard | 2009-10-17 22:36:15 +0000 |
---|---|---|
committer | Simon Howard | 2009-10-17 22:36:15 +0000 |
commit | e30325c40f6ea482862745db0f4555e513f2952e (patch) | |
tree | 74bf8304a8b9d5edb2f303d1673a03785e6e7bfc /opl/opl.c | |
parent | 58f71d21b021bddcb24ac2b2b9736bf821221bd1 (diff) | |
download | chocolate-doom-e30325c40f6ea482862745db0f4555e513f2952e.tar.gz chocolate-doom-e30325c40f6ea482862745db0f4555e513f2952e.tar.bz2 chocolate-doom-e30325c40f6ea482862745db0f4555e513f2952e.zip |
Add OPL library API function to set software emulation sample rate, and
set from snd_samplerate in the configuration file.
Subversion-branch: /branches/opl-branch
Subversion-revision: 1723
Diffstat (limited to 'opl/opl.c')
-rw-r--r-- | opl/opl.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -68,6 +68,8 @@ static opl_driver_t *drivers[] = static opl_driver_t *driver = NULL; static int init_stage_reg_writes = 1; +unsigned int opl_sample_rate = 22050; + // // Init/shutdown code. // @@ -182,6 +184,13 @@ void OPL_Shutdown(void) } } +// Set the sample rate used for software OPL emulation. + +void OPL_SetSampleRate(unsigned int rate) +{ + opl_sample_rate = rate; +} + void OPL_WritePort(opl_port_t port, unsigned int value) { if (driver != NULL) |