Skip to content

Conversation

@lifelandman
Copy link

@lifelandman lifelandman commented Oct 30, 2024

Issue description

In this pull request I am attempting to add support for the steam audio sdk, as in issue#1619.

Solution description

This pull request creates a new steam audio folder and multiple new classes. The two central classes are SteamAudioManager and SteamAudioSound, which are modified copies of the OpenALAudio classes. These classes are modified to hold "listener" and "source" nodepaths respectively as well as list of SteamAudioEffects, which can either use programmer-specified values or the positions of the two nodepaths to apply effects to audio played through these classes. I also eventually plan to add a "scene" class for the sake of implementing steam audio's geometry-simulation capabilities.

Checklist

I have done my best to ensure that…

  • …I have familiarized myself with the CONTRIBUTING.md file
  • …this change follows the coding style and design patterns of the codebase
  • …I own the intellectual property rights to this code
  • …the intent of this change is clearly explained
  • …existing uses of the Panda3D API are not broken
  • …the changed code is adequately covered by the test suite, where possible.

lifelandman and others added 13 commits October 20, 2024 12:58
Since I'm not the most experienced in C++, I'm wondering if I should try to write my implementation from scratch while only using the openAL implementation as a reference. To be safe, I'm saving the files I made out to be copies so I can try modifying the tried-and-true implementation later if need be.
It's embarrassing, but I'm learning C++ as I go along through this. Changing to  copies rather than children of the OpenAL classes because most members of those classes are private and not protected.
@lifelandman
Copy link
Author

I'm still trying to figure out how to actually add my new code to the build process, as well as how to link in the Steam Audio library. If anybody's willing to check and see if I've made any mistakes so far, that would be very well appreciated!

@lifelandman lifelandman changed the title draft: add steam audio support Add steam audio support Oct 30, 2024
lifelandman and others added 13 commits October 30, 2024 13:31
Now that I've had some learning experience in writing steam audio code, this just seems like a much easier way to go about things. Furthermore, this solves the issue of SteamAudioManager and co. ignoring OpenAl's remutex, thus breaking threading. I'll remove the old classes once I'm done transferring my original code.
This is now creating errors at the linking stage. I'll tackle those tomorrow, but I consider it a success that there are no complaints about the removal of the old classes.
@lifelandman
Copy link
Author

Hmm... Steam Audio allows for effect settings to be set per-source through a different interface than the global effect options. That said, the options provided are 1-1 with the global effect options, so I'm wondering if I should write a "match_source_parameters_to_effect" function, which would take a SteamAudioProcessor (which handles all of its sources privately), the name of the source, and an effect to copy the parameters from. It's not exactly intuitive, but it means that any extra copies of SteamAudioEffect classes needed for per-source configuration could be destroyed.

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.

1 participant