dethrace-labs / dethrace

Reverse engineering the 1997 game "Carmageddon"
https://twitter.com/dethrace_labs
GNU General Public License v3.0
669 stars 38 forks source link

Per-channel audio buffers #329

Closed dethrace-labs closed 1 year ago

dethrace-labs commented 1 year ago

Pulls logic from the DOS executable which implemented per-channel audio correctly. Each channel holds a reference to the playing sound instance.

In the windows build, the DirectSound implementation was flawed as the directsound buffer was attached to the sound descriptor, not the sound instance. This meant that only a single instance of a sound could be played at any time.

Also switches s3 function names from “dispose” to “release” to better match the known naming convention.

Fixes #281 Fixes #324