From 3698a62420c6b1d059afef3ea2634ed456155cc6 Mon Sep 17 00:00:00 2001 From: nekonesse <50628290+nekonesse@users.noreply.github.com> Date: Thu, 12 Sep 2024 01:25:27 -0400 Subject: [PATCH 1/6] Fix typo in audio_sound_loop_end.htm ins_sound tries to play "snd_snd_machine" instead of "snd_machine" which the audio_loop_start and audio_loop_end refer to, this fixes that issue. --- .../Audio/Audio_Loop_Points/audio_sound_loop_end.htm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop_end.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop_end.htm index eea46d71..258bacbb 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop_end.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop_end.htm @@ -51,7 +51,7 @@

Returns:

Example:

audio_sound_loop_start(snd_machine, 4);
audio_sound_loop_end(snd_machine, 10);
- ins_sound = audio_play_sound(snd_snd_machine, 100, true); + ins_sound = audio_play_sound(snd_machine, 100, true);

The above code sets the loop start point for the existing sound asset snd_machine to 4 seconds and the loop end point to 10 seconds. The sound is then played with a priority of 100 and loop set to true. The new sound instance gets its loop start and end position from the sound asset. Its ID is stored in a variable ins_sound.

 

@@ -72,4 +72,4 @@
© Copyright YoYo Games Ltd. 2023 All R audio_sound_loop_end --> - \ No newline at end of file + From f081f446ba1ae577cf1c8e8000b8ecb0452ced8e Mon Sep 17 00:00:00 2001 From: nekonesse <50628290+nekonesse@users.noreply.github.com> Date: Thu, 12 Sep 2024 01:26:10 -0400 Subject: [PATCH 2/6] Fix typo in audio_sound_loop_start.htm ins_sound tries to play "snd_snd_machine" instead of "snd_machine" which the audio_loop_start and audio_loop_end refer to, this fixes that issue. --- .../Audio/Audio_Loop_Points/audio_sound_loop_start.htm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop_start.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop_start.htm index ffacb414..9c0141ef 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop_start.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Loop_Points/audio_sound_loop_start.htm @@ -52,7 +52,7 @@

Returns:

Example:

audio_sound_loop_start(snd_machine, 4);
audio_sound_loop_end(snd_machine, 10);
- ins_sound = audio_play_sound(snd_snd_machine, 100, true);

+ ins_sound = audio_play_sound(snd_machine, 100, true);

The above code sets the loop start point for the existing sound asset snd_machine to 4 seconds and the loop end point to 10 seconds. The sound is then played with a priority of 100 and loop set to true. The new sound instance gets its loop start and end position from the sound asset. Its ID is stored in a variable ins_sound.

 

 

@@ -72,4 +72,4 @@
© Copyright YoYo Games Ltd. 2023 All R audio_sound_loop_start --> - \ No newline at end of file + From 4a2974e73e5c17abb122b75806ab423f4fd7d610 Mon Sep 17 00:00:00 2001 From: gurpreetsinghmatharoo Date: Fri, 13 Sep 2024 11:40:15 +0530 Subject: [PATCH 3/6] docs(feature): FP - document marginInline https://github.com/YoYoGames/GameMaker-Bugs/issues/7602 --- .../GML_Reference/Flex_Panels/Flex_Panels_Styling.htm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Flex_Panels/Flex_Panels_Styling.htm b/Manual/contents/GameMaker_Language/GML_Reference/Flex_Panels/Flex_Panels_Styling.htm index d1168723..b8977e6b 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Flex_Panels/Flex_Panels_Styling.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Flex_Panels/Flex_Panels_Styling.htm @@ -42,7 +42,7 @@

Property List

  • justifyContent
  • direction
  • gap, gapRow, gapColumn
  • -
  • margin, marginLeft, marginRight, marginTop, marginBottom, marginStart, marginEnd, marginHorizontal, marginVertical
  • +
  • margin, marginInlinemarginLeft, marginRight, marginTop, marginBottom, marginStart, marginEnd, marginHorizontal, marginVertical
  • padding, paddingLeft, paddingRight, paddingTop, paddingBottom, paddingStart, paddingEnd, paddingHorizontal, paddingVertical
  • border, borderLeft, borderRight, borderTop, borderBottom, borderStart, borderEnd, borderHorizontal, borderVertical
  • start, end
  • @@ -105,7 +105,7 @@

    Position Type

  • "static": The node will behave like relative except it will ignore insets and will not form a Containing Block for its children.
  • Margin

    -

    Struct properties: margin, marginLeft, marginRight, marginTop, marginBottom, marginStart, marginEnd, marginHorizontal, marginVertical
    +

    Struct properties: marginmarginInlinemarginLeft, marginRight, marginTop, marginBottom, marginStart, marginEnd, marginHorizontal, marginVertical
    Functions: flexpanel_node_style_set_marginflexpanel_node_style_get_margin

    This is the space around the outside of the node. You can define it for all edges or for a specific edge. Accepts pixel values and percentages.

    Padding

    From 8080376e6eee4d64f26648c4a1804e06386948fe Mon Sep 17 00:00:00 2001 From: gurpreetsinghmatharoo Date: Fri, 13 Sep 2024 11:47:43 +0530 Subject: [PATCH 4/6] docs(feature): Android file injection directory fix https://github.com/YoYoGames/GameMaker-Bugs/issues/7614 --- .../Extension_Creation/Android_Extensions.htm | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/Manual/contents/The_Asset_Editors/Extension_Creation/Android_Extensions.htm b/Manual/contents/The_Asset_Editors/Extension_Creation/Android_Extensions.htm index ae0ad1a0..246ce619 100644 --- a/Manual/contents/The_Asset_Editors/Extension_Creation/Android_Extensions.htm +++ b/Manual/contents/The_Asset_Editors/Extension_Creation/Android_Extensions.htm @@ -46,8 +46,8 @@

    Code Injection

    YYAndroidGradleEnd
    YYAndroidGradleAndroid
    YYAndroidGradleDependencies 
    - YYAndroidGradleProperties
    - YYAndroidBuildTypesRelease

    + YYAndroidGradleProperties
    + YYAndroidBuildTypesRelease
    YYAndroidManifestAttributes
    YYAndroidManifestApplicationAttributes
    YYAndroidManifestActivityAttributes
    @@ -129,18 +129,18 @@

    Injecting Values

    FILE_DIR
    SRC_DIR
    OUTPUT_DIR
    - CLASSPATH
    + CLASSPATH

    // Project Information
    - YYAndroidPackageName
    - YYAndroidPackageDomain
    - YYAndroidPackageCompany
    - YYAndroidPackageProduct
    - YYAndroidDisplayName
    - YYAndroidMajorVersion
    - YYAndroidMinorVersion
    - YYAndroidBuildVersion
    - YYAndroidMinSDKVersion
    + YYAndroidPackageName
    + YYAndroidPackageDomain
    + YYAndroidPackageCompany
    + YYAndroidPackageProduct
    + YYAndroidDisplayName
    + YYAndroidMajorVersion
    + YYAndroidMinorVersion
    + YYAndroidBuildVersion
    + YYAndroidMinSDKVersion

    Conditional Injection

    You can inject code conditionally, depending on the value of one of the Extension Options.

    @@ -183,7 +183,8 @@

    File Injection

     You can create your own tags for this use. Such custom tags must start with YYAndroid.

    The ${YYAndroidMyInjectionTag} part here will be replaced with the contents of the <YYAndroidMyInjectionTag> </YYAndroidMyInjectionTag> group from the extension's Code Injection window.

    Custom Files

    -

    You can create a folder called "ProjectFiles" in the folder of your extension (alongside its .yy file). Any files placed in this folder will be moved to the root of the generated Android project at compile time, and can also take injection tags as described above.

    +

    You can create a folder called "AndroidSource" in the folder of your extension (alongside its .yy file) and another folder inside that called "ProjectFiles". Any files placed in this folder will be moved to the root of the generated Android project at compile time, and can also take injection tags as described above.

    +

    For example, let's say you want to place the file google-services.json into your Android project using the extension Extension1, then the final path for that file in your GameMaker project will be <project_directory>/extensions/Extension1/AndroidSource/ProjectFiles.

    Source Files

    Once you have set this up correctly, you will need to add the files required for your extension package to work. To do this you need to click on the buttons at the bottom, either Add SDK or Add Source and then browse to the files you wish to add. Added files will be stored in the AndroidSource directory along with your extension. You can open this location at any time by right clicking RMB Icon on the extension and selecting Open in Explorer.

    For information on your creating native extensions for Android, see Source Examples.

    From 0eeb52e28e39b04913a2ce7c01c6573f1bf92a9b Mon Sep 17 00:00:00 2001 From: gurpreetsinghmatharoo Date: Tue, 17 Sep 2024 16:04:21 +0530 Subject: [PATCH 5/6] docs(feature); Add a function to toggle strict error handling for audio functions https://github.com/YoYoGames/GameMaker-Bugs/issues/7285 --- .../Asset_Management/Audio/Audio.htm | 11 ++- .../Audio/audio_system_is_initialised.htm | 10 +-- .../Audio/audio_throw_on_error.htm | 75 +++++++++++++++++++ Manual/toc/Default.toc | 1 + 4 files changed, 91 insertions(+), 6 deletions(-) create mode 100644 Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_throw_on_error.htm diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio.htm index 107344cb..d3be1369 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio.htm @@ -90,8 +90,16 @@

    Web Audio

     This event will be triggered on all platforms, but on everything except HTML5 it will only be triggered once on Game Start when the audio engine is first initialised.

    To check if audio can be played using Web Audio, you can use audio_sound_is_playable.

    +

    Audio Error Handling

    +

    There may be cases where a function has to either throw a fatal error (crashing the game) or print an error message to the Output Log. These general cases are described below:

    +
      +
    • Any function taking a Sound Asset will throw a fatal error when passed an invalid sound (i.e. the given sound asset does not exist).
    • +
    • Functions taking a Sound Instance ID will print an error message to the Output Log when an invalid sound is passed (i.e. the sound instance is not playing), however it will not cause a crash.
    • +
    • Functions taking specific values such as audio_falloff_set_model will throw a fatal error when an invalid value is passed.
    • +
    • Invalid operations will throw a fatal error (e.g. attempting to record using an already active input device).
    • +
    +

    For cases that throw a fatal error, you can instead choose to have an output message logged by calling audio_throw_on_error with true. This will make the game continue in a situation where it would have otherwise crashed, however the effect of the error may still cause bugs in your game. See the function page for information on which functions are affected.

    Function Reference

    -

     Any function taking a Sound Asset will throw a fatal error when passed an invalid sound (i.e. the given sound asset does not exist). Functions taking a Sound Instance ID will print an error message to the output log when an invalid sound is passed (i.e. the sound instance is not playing) however it will not cause a crash.

    Asset Info

    Debugging

      diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_system_is_initialised.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_system_is_initialised.htm index 3e09b23a..11ebf2b9 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_system_is_initialised.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_system_is_initialised.htm @@ -4,7 +4,7 @@ audio_system_is_initialised - + @@ -27,7 +27,7 @@

      Syntax:

      audio_system_is_initialised();

       

      Returns:

      -

      Boolean

      +

      Boolean

       

      Example:

       

      @@ -51,7 +51,7 @@

      Example:

          audio_emitter_bus(em_emitter, bus_special_effects);
      }

      - if (audio_initialised)
      + if (audio_initialised)
      {
          // The audio system can be used here
          // ...
      @@ -64,10 +64,10 @@

      Example:

      Back: Audio
      - +
      -
      © Copyright YoYo Games Ltd. 2023 All Rights Reserved
      +
      © Copyright YoYo Games Ltd. 2024 All Rights Reserved
      + + + \ No newline at end of file diff --git a/Manual/toc/Default.toc b/Manual/toc/Default.toc index 670b0323..16a6cd10 100644 --- a/Manual/toc/Default.toc +++ b/Manual/toc/Default.toc @@ -999,6 +999,7 @@ + From b02efe6700d0d9bbac51a1a950aaaf5268429439 Mon Sep 17 00:00:00 2001 From: gurpreetsinghmatharoo Date: Tue, 17 Sep 2024 18:58:27 +0530 Subject: [PATCH 6/6] docs(feature): Documented user-facing changes as a result of decoupling audio decoding threads from the audio context https://github.com/YoYoGames/GameMaker-Bugs/issues/7055 --- .../Asset_Management/Audio/Audio.htm | 2 +- .../Audio_Synchronisation.htm | 9 +++++---- .../audio_play_in_sync_group.htm | 12 ++++++------ .../audio_sync_group_debug.htm | 9 +++++---- .../Audio/audio_channel_num.htm | 10 +++++----- .../Debugging/The_Debug_Overlay.htm | 12 ++++++++++-- .../Reference/Debug/debug_overlay_audio.png | Bin 36193 -> 86808 bytes 7 files changed, 32 insertions(+), 22 deletions(-) diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio.htm index d3be1369..ec01b17a 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio.htm @@ -94,7 +94,7 @@

      Audio Error Handling

      There may be cases where a function has to either throw a fatal error (crashing the game) or print an error message to the Output Log. These general cases are described below:

      • Any function taking a Sound Asset will throw a fatal error when passed an invalid sound (i.e. the given sound asset does not exist).
      • -
      • Functions taking a Sound Instance ID will print an error message to the Output Log when an invalid sound is passed (i.e. the sound instance is not playing), however it will not cause a crash.
      • +
      • Functions taking a Sound Instance ID will print an error message to the Output Log when an invalid sound is passed (i.e. the sound instance is not playing), however it will not cause a crash. The same applies to functions taking an Audio Sync Group ID.
      • Functions taking specific values such as audio_falloff_set_model will throw a fatal error when an invalid value is passed.
      • Invalid operations will throw a fatal error (e.g. attempting to record using an already active input device).
      diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Synchronisation/Audio_Synchronisation.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Synchronisation/Audio_Synchronisation.htm index 779c88e8..37352f65 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Synchronisation/Audio_Synchronisation.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Synchronisation/Audio_Synchronisation.htm @@ -4,7 +4,7 @@ Audio Synchronisation - + @@ -15,7 +15,8 @@

      Audio Synchronisation

      -

      The audio sync group functions let you play multiple sounds that start at exactly the same time and stay in sync (on a per sample level). This enables you to (for example) add various tracks for a single song and then fade in and out sections without having to worry about whether there will be any delay between them. Note that these functions currently only work with compressed audio, ie. *.ogg and *.mp3 format files.

      +

      The audio sync group functions let you play multiple sounds that start at exactly the same time and stay in sync (on a per sample level). This enables you to (for example) add various tracks for a single song and then fade in and out sections without having to worry about whether there will be any delay between them.

      +

      All sounds in sync groups are played at the highest priority.

      The following functions exist to deal with synchronising audio tracks:

      @@ -40,7 +41,7 @@

      Audio Synchronisation< -

      © Copyright YoYo Games Ltd. 2023 All Rights Reserved
      +
      © Copyright YoYo Games Ltd. 2024 All Rights Reserved

      audio_play_in_sync_group

      -

      With this function you can assign a sound to a previously created sync group. The group index is the value returned when you created the group using the function audio_create_sync_group(), and the sound index is the index of any compressed sound (*.ogg or *.mp3) from the Asset Browser. This function only adds the sound to the group, but it does not play the sound. The return value will be >= 0 if it succeeds and -1 if it fails, where a successful value indicates the sound's order in the sync group (so 0 would be the first sound added, 1 would be the second, etc...). 

      +

      With this function you can assign a sound to a previously created sync group. The group index is the value returned when you created the group using the function audio_create_sync_group(), and the sound index is the handle of any sound from the Asset Browser. This function only adds the sound to the group, but it does not play the sound. The return value will be >= 0 if it succeeds and -1 if it fails, where a successful value indicates the sound's order in the sync group (so 0 would be the first sound added, 1 would be the second, etc.). 

       

      Syntax:

      @@ -29,19 +29,19 @@

      Syntax:

      group_index - Audio Sync Group ID + Audio Sync Group ID The group index to assign the sound to. sound_index - Sound Asset + Sound Asset The sound index to be assigned to the group.

       

      Returns:

      -

      Real

      +

      Real

       

      Example:

      sg = audio_create_sync_group(true);
      @@ -61,7 +61,7 @@

      Example:

      -
      © Copyright YoYo Games Ltd. 2022 All Rights Reserved
      +
      © Copyright YoYo Games Ltd. 2024 All Rights Reserved
      -

      audio_sync_group_debug

      +

      audio_sync_group_debug 

      +

       This function is obsolete, please use audio_debug instead.

      This function displays debug information about any given sync group (the group index is the value returned when the group was created using the function audio_create_sync_group). You can call the function with a value of -1 to switch off the overlay.

      When you are debugging the audio sync groups, the overlay will show:

        @@ -52,7 +53,7 @@

        Syntax:

        group_index - Audio Sync Group ID + Audio Sync Group ID The group index to debug, or -1 to switch off the debugging. @@ -80,7 +81,7 @@

        Example:

        -
        © Copyright YoYo Games Ltd. 2023 All Rights Reserved
        +
        © Copyright YoYo Games Ltd. 2024 All Rights Reserved

        audio_channel_num

        With this function you can set how many audio channels are available for playing audio in GameMaker.

        -

        This basically means the number of sounds (or sound instances or voices) that can be played simultaneously. Or, put differently, the number of calls to any of the audio_play_sound_ functions that you can make before sounds may be lost.

        -

        If the number exceeds this value, those sounds with a lower priority are stopped to free up a channel for the sounds with a higher priority.

        +

        This basically means the number of sounds (or sound instances or voices) that can be played simultaneously. Or, put differently, the number of calls to any of the audio_play_sound* (and audio_play_in_sync_group) functions that you can make before sounds may be lost. If the number exceeds this value, those sounds with a lower priority are stopped to free up a channel for the sounds with a higher priority.

        +

        You can pass 0 to disable audio playback.

         You can use this function to optimise your game for devices as the lower the number of channels for audio the better the performance, but bear in mind that this may also cause noticeable cutoff of certain sounds if many are played at once.

         This function is a configuration function of the audio engine and stops all playing sounds when called (i.e. audio_stop_all). Ideally it should not be called when sounds are already playing, unless you are e.g. using this as an adjustable setting in your game.

         

        @@ -33,7 +33,7 @@

        Syntax:

        num - Real + Real Number of available audio channels (default is 128) @@ -74,7 +74,7 @@

        Example:

        -
        © Copyright YoYo Games Ltd. 2023 All Rights Reserved
        +
        © Copyright YoYo Games Ltd. 2024 All Rights Reserved