DavidGriffith / frotz

Infocom-style interactive fiction player for Unix and DOS (moved to https://gitlab.com/DavidGriffith/frotz)
GNU General Public License v2.0
209 stars 64 forks source link

Sound sucks #4

Closed DavidGriffith closed 9 years ago

DavidGriffith commented 9 years ago

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.

DavidGriffith commented 9 years ago

The problem is that in mixer() in ux_audio.c, AIFF samples are always played as 2-channel samples.

DavidGriffith commented 9 years ago

Fixed sound distortion in https://github.com/DavidGriffith/frotz/commit/ad6d37e9f1652b563f0d141bd2b66466c490fbc8