Skip to content

Commit

Permalink
docs(general): note on error when audio group isn't loaded
Browse files Browse the repository at this point in the history
YoYoGames/GameMaker-Bugs#235

Added a note to the Audio Groups page that mentions an error will be shown in the console when an audio group isn't loaded
  • Loading branch information
YYBartT committed Dec 4, 2024
1 parent 67375d8 commit 12156a7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Audio Groups</title>
<meta name="generator" content="Adobe RoboHelp 2020" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<link rel="stylesheet" href="../../../../../assets/css/default.css" type="text/css" />
<script src="../../../../../assets/scripts/main_script.js" type="module"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand All @@ -19,6 +19,7 @@ <h1><span data-field="title" data-format="default">Audio Groups</span></h1>
<p>You can create these <strong>audio groups</strong> from the <a data-xref="{title}" href="../../../../../Settings/Audio_Groups.htm">Audio Groups</a> window - which can be opened from <a data-xref="{title}" href="../../../../../IDE_Navigation/Menus/The_Tools_Menu.htm">The Tools Menu</a> at the top of the IDE - and you can assign your audio assets to a specific group from the <a href="../../../../../The_Asset_Editors/Sounds.htm">Sound Properties Window</a>.</p>
<p>Each audio group has its own gain. The gain of all sounds in an audio group is multiplied by that audio group&#39;s gain. The default value is 1 but it can be changed using <span class="inline2"><a data-xref="{title}" href="audio_group_set_gain.htm">audio_group_set_gain</a></span> and retrieved using <span class="inline2"><a data-xref="{title}" href="audio_group_get_gain.htm">audio_group_get_gain</a></span> respectively.</p>
<p class="note"><span data-conref="../../../../../assets/snippets/Tag_note.hts"> </span> All audio groups can be accessed in code through a constant that <span data-keyref="GameMaker Name">GameMaker</span> defines for each of the groups. The default audio group is <span class="inline2"><a data-xref="{title}" href="audiogroup_default.htm">audiogroup_default</a></span>. To get the name of the group as a string you can use <span class="inline2"><a data-xref="{title}" href="audio_group_name.htm">audio_group_name</a></span>.</p>
<p class="note"><span data-conref="../../../../../assets/snippets/Tag_note.hts"> </span> Trying to play a sound using the <span class="inline">audio_play_sound*</span> functions from an audio group that&#39;s not loaded will not play anything and return a sound instance index of -1. An error message is also output to the console.</p>
<h2>Function Reference</h2>
<h3>Group Info</h3>
<ul class="Disc">
Expand Down Expand Up @@ -51,7 +52,7 @@ <h3>Audio Properties</h3>
<div style="float:right">Next: <a data-xref="{title}" href="../Audio_Buffers/Audio_Buffers.htm">Audio Buffers</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2023 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
Audio Groups
Expand Down

0 comments on commit 12156a7

Please sign in to comment.