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

Improved Bocfel sound support #382

Closed
wants to merge 1 commit into from

Conversation

angstsmurf
Copy link
Contributor

@angstsmurf angstsmurf commented Sep 8, 2020

Adds support for callbacks to properly fade and loop sound effects in Sherlock and The Lurking Horror. Basically I've copied and pasted code from Frotz, so it might not be super clean and consistent, but it seems to work.

Main caveats: only tested on macOS. Seems to play samples faster (at double speed?) than the almost identical code in Spatterlight and Frotz. Is this due to a difference between SDL 1 and SDL 2?

The latest Bocfel seems to require an extra ZTERP_GLK_BLORB flag to build with Blorb support.

EDIT: A simple way to test this is to type >BLOW WHISTLE, WAIT at the beginning of Sherlock: The Riddle of the Crown Jewels. Requires the right version of the game and the .blb version of the sounds, of course.

Adds support for callbacks to properly fade and loop sound effects
in Sherlock and The Lurking Horror
@cspiegel
Copy link
Contributor

Thank you for this. When I have a bit of time I'll look it over. The original sound code was rather perfunctorily done, so it'll be nice to have it more complete.

The ZTERP_GLK_BLORB thing was done a few months ago to better integrate Blorb with non-Gargoyle Glk implementations (e.g. https://github.com/townba/glkterm). I think the rationale was that I knew Gargoyle supported Blorb, but I couldn't assume non-Gargoyle implementations supported it, so I had to add a new flag once I made a lot of the multimedia code more universal.

Since you're integrating Bocfel into Spatterlight, I'll make sure to ping you on future changes that could affect how it works outside of its own build system, so you're not caught unaware.

@cspiegel
Copy link
Contributor

Inspired by this merge request I've added support for sound callbacks in Bocfel 1.3. I did some fairly large changes around how interrupt routines are handled, so had to do this in a different manner, by and large.

The Lurking Horror hack still isn't done, and I'm not sure if I will add it or not. Probably at some point, but I wanted to prioritize the non-hacky behavior first, so at least fading works now.

@angstsmurf angstsmurf closed this Apr 11, 2021
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.

None yet

2 participants