From 0bdfe53395181e3b6a1f2aca83571c164dc92aec Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Sun, 17 Nov 2013 15:53:32 -0800 Subject: [PATCH] reduce buffer size for speaker * this allows for better latency with the 22050Hz sample rate * keep the mockingboard at the same buffersize to prevent underruns (latency handled differently there) --- src/mockingboard.c | 3 ++- src/soundcore.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mockingboard.c b/src/mockingboard.c index 8c99a44a..d2bfa793 100644 --- a/src/mockingboard.c +++ b/src/mockingboard.c @@ -221,7 +221,8 @@ static BYTE g_nPhasorMode = 0; // 0=Mockingboard emulation, 1=Phasor native #ifdef APPLE2IX #define MB_CHANNELS 2 -#define MB_BUF_SIZE MAX_SAMPLES * MB_CHANNELS +// NOTE - SAMPLE SIZE CHANGED : /2 for SPEAKER -- *2 here +#define MB_BUF_SIZE MAX_SAMPLES * 2 * MB_CHANNELS static const unsigned short g_nMB_NumChannels = MB_CHANNELS; static const DWORD g_dwDSBufferSize = MB_BUF_SIZE; diff --git a/src/soundcore.h b/src/soundcore.h index 97940e22..5b73644a 100644 --- a/src/soundcore.h +++ b/src/soundcore.h @@ -19,7 +19,7 @@ #include "ds-shim.h" -#define MAX_SAMPLES (16*1024) +#define MAX_SAMPLES (8*1024) #if defined(APPLE2IX) #define SAFE_RELEASE(p) Free(p)