1. Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

[SOLVED] audio_play_sound_at seems to be playing sounds from the wrong side

Discussion in 'Programming' started by MonkeyFace771, Sep 15, 2016.

  1. Hello. I recently started using GameMaker Studio and have been going through some of the tutorials.

    I noticed in the tutorial "Audio_Part2_Changing_Audio" that sounds that are being played using the function audio_play_sound_at seem to be playing from the wrong side. Sounds that I expect to play from the left side are being played from the right side, and from the left side when I expect the right side.

    I have tried using the code shown in the tutorial, as well as setting the x value in the function specifically to -1 (in attempt to make the sound come from the left), but the sound always seems to come from the wrong side.

    Is there something I am missing with regards to the audio listener? Any advice would be appreciated.

    Thanks.
     
  2. popjin

    popjin Member

    Joined:
    Jun 22, 2016
    Posts:
    17
    In your post, I'm not quite sure what you mean when you say left or right sides, so I'm just going to assume you mean your speaker. It could be that you may have setup the speaker wrong, in which case you can flip or switch them to get the correct sound or try flipping your code to change it.

    Hope this helped!
     
  3. Thanks for the reply. Yes, you are correct in assuming I mean speaker.

    I believe the issue is specific to GameMaker Studio, as my speaker configuration test (through the playback devices configuration settings on Windows) is giving me sounds through the expected speakers.

    I can make the sounds come from the expected speakers in GameMaker Studio if I change the x values around, but I was hoping to be able to keep negative x values as left, as the tutorial and online documentation suggests should be the case. (And right as positive x values).

    I read something on Google suggesting that the default audio listener orientation might cause the situation I am experiencing, so I would probably be able to fix the issue by changing the listener orientation. (This information came from an article written in 2014, so I don't know if it is currently accurate.) However, I don't know if it is normal to have to change the listener orientation.

    My worry is that I don't know if this situation is something specific to my computer / setup of GameMaker Studio, or if this is something that others have experienced. As such, I don't know if changing the x values around (or changing the listener orientation) would result in the sounds coming from the correct speakers for me, but the wrong speakers for other people.
     
  4. icuurd12b42

    icuurd12b42 TMC Founder GMC Elder

    Joined:
    Apr 22, 2016
    Posts:
    1,840
    set the listener facing vector to 0,-1,0 and it's up vector to 0,0,-1. if that did not work try up vector of 0,0,1
     
    FeNniX and Dogarooski like this.
  5. Using the 0,-1,0 and 0,0,-1 seems to have solved the issue. Thanks a bunch for the help.
     
    FeNniX likes this.
  6. icuurd12b42

    icuurd12b42 TMC Founder GMC Elder

    Joined:
    Apr 22, 2016
    Posts:
    1,840
  7. Uhfgood

    Uhfgood Member

    Joined:
    Sep 26, 2016
    Posts:
    87
    I actually just experienced this problem right now. How come the listener orientation isn't automatically set to a default value for negative being on the left and positive on the right? This particular tutorial is in the beginner section and this isn't exactly a beginner topic (although it's easy enough to learn).
     
  8. icuurd12b42

    icuurd12b42 TMC Founder GMC Elder

    Joined:
    Apr 22, 2016
    Posts:
    1,840
    "But it's the default 3d setting!"
    ^There is a disconnect at yoyo between what is considered default by every 3d system (where the default make sense) and the reality of the default top down setting of the 2d environment of the engine.
     

Share This Page