feat: schedule audio sampling on scheduler

DMA sound in games like Pokemon Emerald, Chobits, Love Hina, and Kirby:
Nightmare in Dream Land sound great save for conerns about resampling
This commit is contained in:
2022-04-14 05:58:32 -03:00
parent 92cabd248b
commit 172a59aefb
6 changed files with 67 additions and 69 deletions

View File

@@ -242,9 +242,9 @@ fn initAudio() SDL.SDL_AudioDeviceID {
var have: SDL.SDL_AudioSpec = undefined;
var want = std.mem.zeroes(SDL.SDL_AudioSpec);
want.freq = 32768;
want.format = SDL.AUDIO_S8;
want.format = SDL.AUDIO_F32;
want.channels = 2;
want.samples = 0x200;
want.samples = 0x100;
want.callback = null;
const dev = SDL.SDL_OpenAudioDevice(null, 0, &want, &have, 0);