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

Audio support #130

Merged
merged 17 commits into from
Jun 3, 2022
Merged

Audio support #130

merged 17 commits into from
Jun 3, 2022

Conversation

dethrace-labs
Copy link
Owner

@dethrace-labs dethrace-labs commented May 30, 2022

@dethrace-labs dethrace-labs marked this pull request as draft May 30, 2022 19:06
@mackron
Copy link

mackron commented May 31, 2022

FYI, I went ahead and gave this a quick try. Just a few things I found:

  • In sound.c, the UsePathFileToDetermineIfFullInstallation() function uses fixed sized arrays of capacity 80 which is too small. My application path is this, and it just breaks with a stack corruption error: "C:\Program Files (x86)\GOG Galaxy\Games\Carmageddon Max Pack\CARSPLAT/DATA"
  • Same as above, but in S3LoadSample() in s3audio.c.
  • In audio.c and s3audio.c, the fopen(pThe_path, "r"); calls need to be changed to fopen(pThe_path, "rb"); (note the change from "r" to "rb").

After I fixed the above issues it seems to work quite nicely on Windows for me. Good work!

@dethrace-labs
Copy link
Owner Author

@mackron thanks for trying it out! I'll take care of increasing the path buffer size along with a comment explaining the change to the original code 👍

@dethrace-labs dethrace-labs marked this pull request as ready for review June 2, 2022 05:00
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.

2 participants