Closed DavidGriffith closed 9 years ago
The problem is that in mixer() in ux_audio.c, AIFF samples are always played as 2-channel samples.
Fixed sound distortion in https://github.com/DavidGriffith/frotz/commit/ad6d37e9f1652b563f0d141bd2b66466c490fbc8
Sound needs to be able to play without blocking the rest of the program. I thought that simply forking would work, like it did with the OSS sound support, but I ran into weird problems when it came to needing to stop sounds. Threads then became the way to go. I don't have a solid handle on how to do this yet.
The other big part of sound support is making sure the sounds play correctly. OGG and MOD files will play correctly, but AIFF might or might not. 2-channel, 16-bit, 44100 Hz samples play fine. 1-channel, 8-bit, 11025 Hz samples play too fast and high.