1. Hey! Guest! The 32nd GMC Jam will take place between Feb 22nd, 12:00 UTC (Friday noon) and Feb 25th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

GML [SOLVED] audio_sound_play Priority? (manual)

Discussion in 'Programming' started by Dr_Nomz, Feb 11, 2019.

  1. Dr_Nomz

    Dr_Nomz Member

    Joined:
    Oct 31, 2016
    Posts:
    480
    So I was reading the manual (shocking, I know.) and one of the things about audio_sound_play is that apparently the second variable does nothing?
    Quote:

    QUOTE](the actual value is arbitrary, and can be from 0 to 1 or 0 to 100, as GameMaker: Studio will prioritize them the same)[/QUOTE]So does it really mean that it does nothing? Or does it actually do something? If so, higher or lower numbers, which means it plays over other sounds?
     
  2. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    3,559
    Sounds with higher priority will always play over sounds with lower priority if the audio engine is forced to choose, so that argument has a point.

    What the Manual meant was that only the relative ordering of the priority values matters. For example, with no other sounds being involved, there is no difference between playing A at 0 and B at 1, and playing A at 0 and B at 100. The relative ordering has not changed, in both cases the priority of B is greater than the priority of A. You should pick a range as a convention and stick to the same one throughout the project.
     
    Dr_Nomz likes this.
  3. Dr_Nomz

    Dr_Nomz Member

    Joined:
    Oct 31, 2016
    Posts:
    480
    Good to know, thanks!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice