mirror of
https://github.com/JorjBauer/aiie.git
synced 2024-08-14 19:29:00 +00:00
fix chirp on startup
This commit is contained in:
parent
e138f7be3f
commit
ae47fb63df
@ -15,10 +15,12 @@ extern "C"
|
||||
|
||||
#include "globals.h"
|
||||
|
||||
#define SDLSIZE (4096)
|
||||
#define SDLSIZE (2048)
|
||||
// But we want to keep more than just that, so we can fill it full every time
|
||||
#define CACHEMULTIPLIER 2
|
||||
|
||||
#define WATERLEVEL SDLSIZE
|
||||
|
||||
// FIXME: Globals; ick.
|
||||
static volatile uint32_t bufIdx = 0;
|
||||
static volatile short soundBuf[CACHEMULTIPLIER*SDLSIZE];
|
||||
@ -50,7 +52,7 @@ static void audioCallback(void *unused, Uint8 *stream, int len)
|
||||
return;
|
||||
}
|
||||
|
||||
if (audioRunning==1 && bufIdx >= SDLSIZE) {
|
||||
if (audioRunning==1 && bufIdx >= WATERLEVEL) {
|
||||
// Fully up and running now; we got a full cache
|
||||
audioRunning = 2;
|
||||
} else if (audioRunning==1) {
|
||||
|
Loading…
Reference in New Issue
Block a user