Add more sounds internally

This commit is contained in:
Modnark
2022-10-11 22:34:36 -04:00
parent af5c31d5d0
commit d32b0ea4e4
10 changed files with 64 additions and 10 deletions

View File

@@ -4,7 +4,7 @@
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#define NUM_SOUNDS 10
#define NUM_SOUNDS 32
static SDL_AudioSpec fmt;
static bool initiated = false;
@@ -23,7 +23,7 @@ void AudioPlayer::init()
initiated = true;
extern void mixaudio(void *unused, Uint8 *stream, int len);
fmt.freq = 22050;
fmt.format = AUDIO_S16;
fmt.format = AUDIO_S16LSB;
fmt.channels = 2;
fmt.samples = 1024; /* A good value for games */
fmt.callback = mixaudio;