mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 19:45:07 +00:00
Sound buffer adjustment.
svn-id: r13269
This commit is contained in:
parent
bdb14cbad9
commit
3be01c0560
@ -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));
|
||||
}
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user