-
Notifications
You must be signed in to change notification settings - Fork 43
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
Platform-specific Audio #599
Conversation
Resolves an issue where spdlog's bundled fmt lib was using deprecated/non-standard MSFT extensions that Windows was removing soon
No audio playing due to bad handling of buffers
Kind of retrofitted to current ECS setup? but the point was to make it playback using OAL first and in a separate static lib.
Need to fix Ogg playback
…to interruptions unhandled
Need to finish standardising samplerate conversion support and formats for XAudio and OpenAL
Resolves an issue where spdlog's bundled fmt lib was using deprecated/non-standard MSFT extensions that Windows was removing soon
No audio playing due to bad handling of buffers
Kind of retrofitted to current ECS setup? but the point was to make it playback using OAL first and in a separate static lib.
Need to fix Ogg playback
…to interruptions unhandled
Need to finish standardising samplerate conversion support and formats for XAudio and OpenAL
87d3728
to
d517243
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks fine I just have some questions - I've only quickly scanned this just due to how large it is.
alGetError(); | ||
alSourceStopv(static_cast<int>(_sources.size()), reinterpret_cast<ALuint*>(_sources.data())); | ||
GetALError(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I ask what the difference is between alGetError
and GetALError
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One gets the error code from OpenAL and clears the error register internally (from OpenAL's side) - the other (GetALError
) does that plus actually parses the error code into something human-readable
{ | ||
case AL_INVALID_NAME: | ||
{ | ||
_logger->error("A bad ID or name was passed to the OpenAL function."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we directly using spdlog due to the deprecation of the old APIs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - in this case its easier to do so, and since there's some uncertainty around how the APIs will be used going forward (with the great big refactor) it was just cleaner to do so, so that I could continue to keep the static lib isolated to itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Removes the legacy AudioService and adds the new AudioMixer and OS specific implementations.
What is the new behavior (if this is a feature change)?
Users should begin using the AudioMixer interface and let it choose the backing audio platform automatically.