diff options
author | Simon Howard | 2009-10-03 22:43:07 +0000 |
---|---|---|
committer | Simon Howard | 2009-10-03 22:43:07 +0000 |
commit | 073e710f685a10c2084f6c04fbc4fe7c87530d93 (patch) | |
tree | 22247c68383a7d1530811d11baaecfbbd9ea8596 | |
parent | 13d6fa2bd924f9b305f808b258dbb0b22e90f019 (diff) | |
download | chocolate-doom-073e710f685a10c2084f6c04fbc4fe7c87530d93.tar.gz chocolate-doom-073e710f685a10c2084f6c04fbc4fe7c87530d93.tar.bz2 chocolate-doom-073e710f685a10c2084f6c04fbc4fe7c87530d93.zip |
Use Mix_HookMusic rather than Mix_SetPostMix for OPL emulation, to avoid
conflict with PC speaker emulation.
Subversion-branch: /branches/opl-branch
Subversion-revision: 1706
-rw-r--r-- | opl/opl_sdl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/opl/opl_sdl.c b/opl/opl_sdl.c index 40430546..4a2e1ff8 100644 --- a/opl/opl_sdl.c +++ b/opl/opl_sdl.c @@ -160,8 +160,8 @@ static void FillBuffer(int16_t *buffer, unsigned int nsamples) for (i=0; i<nsamples; ++i) { - buffer[i * 2] += mix_buffer[i] / 2; - buffer[i * 2 + 1] += mix_buffer[i] / 2; + buffer[i * 2] = mix_buffer[i]; + buffer[i * 2 + 1] = mix_buffer[i]; } } @@ -225,7 +225,7 @@ static void OPL_Mix_Callback(void *udata, static void OPL_SDL_Shutdown(void) { - Mix_SetPostMix(NULL, NULL); + Mix_HookMusic(NULL, NULL); if (sdl_was_initialized) { @@ -356,7 +356,7 @@ static int OPL_SDL_Init(unsigned int port_base) callback_queue_mutex = SDL_CreateMutex(); // TODO: This should be music callback? or-? - Mix_SetPostMix(OPL_Mix_Callback, NULL); + Mix_HookMusic(OPL_Mix_Callback, NULL); return 1; } |