1. Hey! Guest! The 33rd GMC Jam will take place between May 23rd, 12:00 UTC (Friday noon) and May 27th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

GMS 2 FMOD dll not working on GMS2

Discussion in 'Legacy GameMaker Community Tech Support' started by ze1, Jan 26, 2017.

  1. ze1

    ze1 Member

    Joined:
    Jul 9, 2016
    Posts:
    15
    I imported a project from GMS to GMS2 which makes use of FMODGMS.dll. However, when I try to run the project, the game doesn't play any music. After investigating a little, I found out that all functions (even FMODGMS_Sys_Create()) are returning 0.
    Am I missing something? Are there any extra steps to make DLLs work on GMS2?
     
    Last edited: Jan 26, 2017
  2. M.S.T.O.P.

    M.S.T.O.P. Member

    Joined:
    Jun 22, 2016
    Posts:
    9
    FMODGMS dev here.

    I haven't been able to get it to work in GM:S 2 either. I'm not sure if the process or requirements for creating DLL-based extensions have changed between GM:S and GMS 2, but I'm trying to figure that out.
     
  3. ze1

    ze1 Member

    Joined:
    Jul 9, 2016
    Posts:
    15
    Oh okay. I really like that extension, so I'll be looking forward to news! Thank you for your work! :)
     
  4. icuurd12b42

    icuurd12b42 TMC Founder GMC Elder

    Joined:
    Apr 22, 2016
    Posts:
    1,832
    turn on the WTF variable in the init

    I bet it's failing on functions that have more than 4 args as per a bug introduced in studio
     
  5. M.S.T.O.P.

    M.S.T.O.P. Member

    Joined:
    Jun 22, 2016
    Posts:
    9
    I checked over all my functions and none of them use more than 3 arguments. The extension works fine in GM:S 1.

    I'm not sure if I follow you here. Can you clarify this for me?
     
  6. grixm

    grixm Member

    Joined:
    Jun 20, 2016
    Posts:
    49
    I think he is talking about a different fmod extension that he wrote himself, not yours. You can see it has a wtf variable here, and also several functions with more than 4 arguments: https://github.com/Grix/GMFMODSimpleGrix/blob/master/GMFMODSimpleScripts.gml#L421
     
  7. MishMash

    MishMash Member

    Joined:
    Jun 20, 2016
    Posts:
    372
    Just going to throw this out there, but doesn't the GMS audio system now use FMOD anyway?
     
  8. icuurd12b42

    icuurd12b42 TMC Founder GMC Elder

    Joined:
    Apr 22, 2016
    Posts:
    1,832
    yeah, totally thought it was that @grixm ...

    OP: The following problems may be the cause:
    1) you forgot to include fmod.dll in your includes or
    2) you put that gms dll and the fmod.dll in a sub folder in the includes...

    fmod.dll is loaded as early binding from the wrapper dll and so it needs to be part of the distribution as that dll is loaded at the same time as the wrapper. if it's not there the external define will fail... And they both need to be in your include structure without specifying a sub folder so that they are both in the exe folder in the final install.

    >Just going to throw this out there, but doesn't the GMS audio system now use FMOD anyway
    @MishMash, Unfortunately, no. I dont know why, I basically told yoyo they could even use my code... Not sure what system they use, but it aint this wonderful fmod which every decent game dev uses
     
    Last edited: Feb 11, 2017
  9. Lewa

    Lewa Member

    Joined:
    Jun 20, 2016
    Posts:
    46
    Maybe it is a licensing issue? As far as i can see fmod isn't an entirely "free" product: http://www.fmod.org/sales/
     
  10. icuurd12b42

    icuurd12b42 TMC Founder GMC Elder

    Joined:
    Apr 22, 2016
    Posts:
    1,832
    it's also very confusing. They changed the licensing to an incomprehensible mess. That's when I decided to drop it
     
  11. renex

    renex Member

    Joined:
    Jun 23, 2016
    Posts:
    506
    Alternatively, I hex edited it to point to a sub folder.
     
  12. M.S.T.O.P.

    M.S.T.O.P. Member

    Joined:
    Jun 22, 2016
    Posts:
    9
    Okay, after much experimentation, I managed to get my FMODGMS extension working under certain conditions. If I try to run a game using it within the IDE (pressing "Run" or "Debug"), it doesn't work and throws up a lot of "LoadLibraryA failed with error 126" messages. But if I export the game as an executable and then run it outside of GMS2, it works perfectly. Now I'm wondering why GMS2 can't find the DLLs during testing.

    I would also like to add, if this matters, that I included the DLLs in the extension itself via the Extension Editor rather than in the Included Files folder. Likewise, all the functions are defined via the editor rather than with external_define.
     
  13. icuurd12b42

    icuurd12b42 TMC Founder GMC Elder

    Joined:
    Apr 22, 2016
    Posts:
    1,832
  14. yoyowan

    yoyowan Member

    Joined:
    Sep 14, 2016
    Posts:
    41
    I managed to make work GMFMODSimple.dll in studio 1.4 by bypassing all functions in LoadFMOD script containing more than 4 args. It's a shame because it is precisely those functions that I need for my project. Is there a way to make run those functions in Studio 1 or 2 ?

    here is the list of functions I have bypassed :
    FMODSoundLoop3d / 5 args
    FMODSoundPlay3d / 5 args
    FMODListenerSet3dPositionEx / 10 args
    FMODBlockerAdd / 9 args
    FMODBlockerSet3dOrientation / 7 args
    FMODInstanceSetSpeakerMix / 9 args

    (is there a bug ticket on it ?)
     
  15. yoyowan

    yoyowan Member

    Joined:
    Sep 14, 2016
    Posts:
    41
  16. M.S.T.O.P.

    M.S.T.O.P. Member

    Joined:
    Jun 22, 2016
    Posts:
    9
    Sorry to necrobump this thread, but I wanted people to know that the problem with FMODGMS not loading in certain situations has been fixed by the GameMaker Studio 2.1 update.
     
    Roman P. likes this.
  17. Lance

    Lance Member

    Joined:
    Jul 2, 2017
    Posts:
    2
    MSTOP that's great news!

    Quick question. I wasn't able to find clarity on this on the FMODGMS itch page, and I'm an incredible noob at all this (I'm a sound designer not an engineer). Will this extension allow me to import and play events from an FMOD Studio build?
     
  18. Lance

    Lance Member

    Joined:
    Jul 2, 2017
    Posts:
    2
    Also sorry! But will this extension allow me to use an FMOD Studio project build in GM? Is there any way to do this??
     
  19. immortalx

    immortalx Member

    Joined:
    Sep 6, 2018
    Posts:
    292
    I'm using FMODGMS right now and I'm only seeing the low-level API functions, so I guess you won't be able to do that.
     

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