Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per-channel audio buffers #329

Merged
merged 4 commits into from
May 18, 2023
Merged

Per-channel audio buffers #329

merged 4 commits into from
May 18, 2023

Conversation

dethrace-labs
Copy link
Owner

@dethrace-labs dethrace-labs commented May 18, 2023

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

void S3DisposeOutlet(tS3_outlet* outlet);
void S3ReleaseOutlet(tS3_outlet* outlet);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asking for rec2, did you invent these names yourself?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Largely, yes. Although there are some DRS3* wrapper functions that we do know the names of in the dethrace code, so I used those where possible for names and conventions

@dethrace-labs dethrace-labs merged commit 3b0f322 into main May 18, 2023
@dethrace-labs dethrace-labs deleted the audio_stumbling branch May 18, 2023 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The horn has a noticeable clicking sound Player car engine sound sometimes cuts out
2 participants