-
Notifications
You must be signed in to change notification settings - Fork 8
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
In-Game: Add support for setting an individual audio instance's gain higher than 1 #5580
Comments
Removed a historic upper limit on source gains, which are the product of voice (instance), asset, group and emitter gains. This means that the constituent gains should always have an effect if set above 1. Listener (master), bus and effect gains were untouched as they already had this behaviour. Here's a little test project for this: gmb-5580-x.zip Please be aware that audio devices/operating systems can sometimes attempt to normalise the audio stream in order to protect the user from what would otherwise be very loud sounds. As a result, you may find that increasing gains might have an inconsistent effect - we have no control over this. |
YoYoGames/GameMaker-Bugs#5580 * Added a note snippet explaining audio may not be heard as expected, since OS or audio device might modify it * Inserted this snippet on all gain setter function pages and on the Audio Properties Overview page
Added a note on all gain setter function pages explaining that either OS or audio device might change the sound's final amplitude. |
* develop.bart: docs(feature): added documentation for physics_raycast YoYoGames/GameMaker-Bugs#2762 docs(feature): documented gamepad_enumerate YoYoGames/GameMaker-Bugs#5329 docs(feature): skeleton_animation_clear optional parameters YoYoGames/GameMaker-Bugs#1570 docs(feature): documented dbg_view_exists and dbg_section_exists YoYoGames/GameMaker-Bugs#4931 docs(feature): documented dbg_view_exists and dbg_section_exists YoYoGames/GameMaker-Bugs#4931 docs(feature): YoYoGames/GameMaker-Bugs#1570 docs(general): mentioned that any attached files are uploaded privately docs(feature): smaller custom format screenshot YoYoGames/GameMaker-Bugs#5495 docs(feature): documented the new dbg_text_separator function YoYoGames/GameMaker-Bugs#4998 docs(feature): Switch to the docking branch of imgui YoYoGames/GameMaker-Bugs#4905 docs(general): document OS and audio device limitations when using audio YoYoGames/GameMaker-Bugs#5580 docs(feature): Add an option to specify "step" in the ImGUI slider control YoYoGames/GameMaker-Bugs#2971 # Conflicts: # Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_length.htm # Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_slider.htm # Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_slider_int.htm
Verified in IDE v9.9.1.676 Runtime v9.9.1.818, thanks. |
Verified changes are in the manual. |
Is your feature request related to a problem?
Currently we're using Gamemaker's audio_bus feature set as a mixing tool to control the volume of grouped assets. This has been an overall improvement of our own custom-writ "bus" system we used previously, but it has some limitations in how it interacts with audio instances.
With the way our audio designers expect to work with audio assets, a bus can be used to turn down a group of assets, but then they want to adjust the gain on individual audio instances using the bus volume as a center. This means that some sounds should be turned down lower, but other sounds need to be turned up. The issues is that, because audio instances don't get any louder when their gain is set over 1, this means that it's impossible to turn sounds up, even if the final output after passing through a bus would be less than 1.
For example, consider an audio instance whose gain is set to +6dB playing through a bus set to -6dB. Any audio designer would assume that the output volume would be 0dB. However, because the asset is invisibly capped at +0dB, the final output audio is at -6dB.
Describe the solution you'd like
Setting the gain of an audio instance to a value greater than 1 should make it louder.
Describe alternatives you've considered
This is possible in Gamemaker if we make use of a "Gain" audio effect - this actually allows you to set gain greater than 0dB. For now we are using this as a workaround.
However, it introduces more code and data to manage than what seems necessary. This audio effect is useful for situations where we want to dynamically adjust a playing sound's gain, but for "fire and forget" situations where we simply want to play a sound at a specified volume, it's an overwrought solution.
Another possible solution we considered is artificially doubling the volume of every audio bus we create and halving the volume of every played audio asset, so our audio effectively sounds identical but has artificial headroom above every asset's volume. If audio busses can have their volume set to greater than 0dB then it would work (I haven't tested it). However, it's a janky and strange workaround.
In either case, since it's technically possible to get the output we want with the game engine, it feels like it should also be possible to achieve that output by using the most simple, obvious and direct method (set the gain on a played audio instance to a value greater than 1).
Additional context
No response
The text was updated successfully, but these errors were encountered: