diff options
author | Marcus Comstedt | 2004-03-14 13:14:03 +0000 |
---|---|---|
committer | Marcus Comstedt | 2004-03-14 13:14:03 +0000 |
commit | 3be01c0560cbfa7a0e7a33f0dc2ea69010e6d7a7 (patch) | |
tree | eb363ce4a8204556be47058a3372cd1271e78c59 | |
parent | bdb14cbad9e9bf2c17d55f56ebece971ba60c37f (diff) | |
download | scummvm-rg350-3be01c0560cbfa7a0e7a33f0dc2ea69010e6d7a7.tar.gz scummvm-rg350-3be01c0560cbfa7a0e7a33f0dc2ea69010e6d7a7.tar.bz2 scummvm-rg350-3be01c0560cbfa7a0e7a33f0dc2ea69010e6d7a7.zip |
Sound buffer adjustment.
svn-id: r13269
-rw-r--r-- | backends/dc/audio.cpp | 4 | ||||
-rw-r--r-- | backends/dc/dc.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/backends/dc/audio.cpp b/backends/dc/audio.cpp index b1a9ba3cd6..0bd1ff6db1 100644 --- a/backends/dc/audio.cpp +++ b/backends/dc/audio.cpp @@ -32,7 +32,7 @@ void initSound() stop_sound(); do_sound_command(CMD_SET_FREQ_EXP(FREQ_22050_EXP)); do_sound_command(CMD_SET_STEREO(1)); - do_sound_command(CMD_SET_BUFFER(3)); + do_sound_command(CMD_SET_BUFFER(SOUND_BUFFER_SHIFT)); } bool OSystem_Dreamcast::setSoundCallback(SoundProc proc, void *param) @@ -82,7 +82,7 @@ void OSystem_Dreamcast::checkSound() memcpy4s(RING_BUF+fillpos, temp_sound_buffer, SAMPLES_TO_BYTES(r)); fillpos = 0; n -= r; - memcpy4s(RING_BUF, temp_sound_buffer+(r<<1), SAMPLES_TO_BYTES(n)); + memcpy4s(RING_BUF, temp_sound_buffer+r, SAMPLES_TO_BYTES(n)); } else { memcpy4s(RING_BUF+fillpos, temp_sound_buffer, SAMPLES_TO_BYTES(n)); } diff --git a/backends/dc/dc.h b/backends/dc/dc.h index 036e329af6..cb2f778e2e 100644 --- a/backends/dc/dc.h +++ b/backends/dc/dc.h @@ -24,6 +24,7 @@ #include <ronin/soundcommon.h> #define NUM_BUFFERS 4 +#define SOUND_BUFFER_SHIFT 3 class OSystem_Dreamcast : public OSystem { @@ -168,7 +169,7 @@ class OSystem_Dreamcast : public OSystem { void *ovl_tx[NUM_BUFFERS]; unsigned short palette[256]; - short temp_sound_buffer[RING_BUFFER_SAMPLES]; + int temp_sound_buffer[RING_BUFFER_SAMPLES>>SOUND_BUFFER_SHIFT]; void checkSound(); |