Audio Lag Fix

Discussion in 'JS Plugin Releases (RMMV)' started by Fornoreason1000, Jan 2, 2017.

  1. Fornoreason1000

    Fornoreason1000 Black Sheep Veteran

    Messages:
    199
    Likes Received:
    92
    Location:
    Anor Londo
    First Language:
    English
    Primarily Uses:
    RMMV
    @Poupouille , thanks for reporting this issue.
    Be sure that the script is up to date (version 0.75 , as of April 2017).

    I don't understand "click on event to take object". I assumed your meant it was a treasure chest of some kind but i couldn't reproduce that error with one. could you please clarify what you meant by that.

    Also could you please post the console log when bug reporting. Those are a lot more detailed and helpful. to open the console press F8. if you are running the game in an actual browser like Firefox, it is F12 instead.
     
    Last edited: May 15, 2017
    #41
  2. Poupouille

    Poupouille Veteran Veteran

    Messages:
    162
    Likes Received:
    26
    First Language:
    Russian, french
    Primarily Uses:
    RMMV
    I can't remember because I suppressed this event in the meantime. But I also remember that, sometimes, I couldn't even run a test of the game. I had version 0.71
    I will test with the 0.75. For now it seems that I have no problem. :)
    And sorry, next time I will do the console log when bug reporting ;)
     
    #42
  3. Poupouille

    Poupouille Veteran Veteran

    Messages:
    162
    Likes Received:
    26
    First Language:
    Russian, french
    Primarily Uses:
    RMMV
    Hello! :)
    What are the news for release?
     
    #43
  4. y0da

    y0da Villager Member

    Messages:
    21
    Likes Received:
    1
    Thank for this update.
    Unfortunately, this is not compatible with Android.
    I tried with both HTML5 audio enable and disabled.

    Could you add Android support please?
    My BGM files take approx 30 seconds to load, no matter which compression I use.
     
    Last edited: Jun 5, 2017
    #44
  5. Fornoreason1000

    Fornoreason1000 Black Sheep Veteran

    Messages:
    199
    Likes Received:
    92
    Location:
    Anor Londo
    First Language:
    English
    Primarily Uses:
    RMMV
    Force HTML5, FORCES Html5 no matter what. you usually do no need to use it.
    I'll look into my implementation of HTML5 Audio. It seems HTML5Audio isn't activating and WebAudio is loading instead.

    Beware that in HTML5 Audio the Audio lag may present it self unless the Audio Element is created and given some time to buffer.
     
    #45
  6. wjsrudtn001

    wjsrudtn001 Villager Member

    Messages:
    15
    Likes Received:
    6
    Hello. This article uses a translator. Therefore, there may be misreading.:kaosigh:

    I am using this plugin to relieve the audio latency of Android devices.
    However, the current version of the plugin does not seem to work on Android.
    So I'm currently using version 0.63 of this plugin.
    The 0.63 version works fine except for 'minor issues' on Android devices.

    The problem is that when using this plug-in, [BGM Fade Out] and [BGS Fade Out]
    It is not working. In addition to that, the sound volume control function does not work
    The volume of all sounds is fixed at the maximum value.

    This is a fatal problem in the game.

    I'm currently building a game using the Android studio
    The game will operate in crosswalk mode.
    One thing to note is that there was no such problem when working with Intel XDK.
    The current game is exactly the same file that APK packaging on Intel XDK.

    How can I solve this problem?
     
    #46
  7. Fornoreason1000

    Fornoreason1000 Black Sheep Veteran

    Messages:
    199
    Likes Received:
    92
    Location:
    Anor Londo
    First Language:
    English
    Primarily Uses:
    RMMV
    Unfortunately this plugin doesn't support android at all. This is Listed under "Known Issues".
    This is because I cannot add support for it as I lack the tools to do so.
    and there as are several errors and bugs that only ever appear on android without any explanation.

    While it may work on Android but I can't fix any bugs for it on that platform. I can only guess its a compatibility issue with crosswalk.


    Also the 0.63 version is out of date however it is a stable release and should work.
    As of 0.80 all the volume controls work, but I've honestly never had that problem with any of the versions.

    Do any of these problems appear in play test(on PC) or a web browser?

    Hopefully in the future i can add Android support.
     
    #47
  8. wjsrudtn001

    wjsrudtn001 Villager Member

    Messages:
    15
    Likes Received:
    6
    It works fine on a PC.
    Version 0.63 or later will not load the BGM file and the game will stop.
    This seems to be caused by my immature use, not the plugin issue.

    This problem only occurs with Android builds.
    Since there is no such problem when building an APK using Intel XDK,
    As you say, I have the feeling that it may be a compatibility issue related to crosswalk.
     
    #48
  9. Fornoreason1000

    Fornoreason1000 Black Sheep Veteran

    Messages:
    199
    Likes Received:
    92
    Location:
    Anor Londo
    First Language:
    English
    Primarily Uses:
    RMMV
    Yes while i was working with Android studio i was getting "Web Audio is not supported" errors, which is really weird. I have noticed they have changed how sound works a little bit on Android.They used to prefer HTML5 Audio on Android. now they basically force WebAudio and not use HTML5 at all. Oddly enough they left HTML5 Audio where it is/From A web designer view this is very bad, as some browser may only support HTML5 which no longer works).

    None of that should matter to the plugin itself. I think in version 0.76+ HTML5 is implemented as a fall back anyway. Like I said I can't do much on Android bugs.
     
    #49
  10. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,581
    Likes Received:
    1,361
    Location:
    Canada / Qu├ębec
    First Language:
    French
    Primarily Uses:
    RMMV
    I not have lag when using the cache system correctly.
    However the new api Pixi-Sound seems much more stable and powerful.
    https://pixijs.github.io/pixi-sound/examples/filters.html

    I am not at the stage of the audio, in my development, but it look like super stable and efficient.
    Awsome filter
    Also very easy to use and mix
    And will take all audio extention, like MP3 , Wav , for pc!

    the sprite audio demo are very cool
     
    #50
  11. Fornoreason1000

    Fornoreason1000 Black Sheep Veteran

    Messages:
    199
    Likes Received:
    92
    Location:
    Anor Londo
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks Jon,
    will have a proper look at it later...

    It seems that PIXI.sound and PIXI.audio still both use WebAudio and HTML5 like everything else (2.0 Alpha). It also uses decodeAudioData like vanilla MV does. this means the lag will popup on this platform with longer sounds as well.
    It does however has some sort of preloading function, whetether if this is just the same as the HTML5 preload flag or not i don't know yet.
    Other than that i think i might use this my game!
     
    #51
  12. DarkEspeon

    DarkEspeon Veteran Veteran

    Messages:
    86
    Likes Received:
    14
    First Language:
    Russian
    Primarily Uses:
    RMMV
    Hello! I came across a problem. When I play any music effect (ME) the game crashes some time after the music ends, ranging from 0 to 2 seconds. It also crashes when I use sound effects (SE) in YanFly's Message plugin! Here's the thing: With HTML5 forcing MEs works, but SEs don't. With HTML5 forcing turned off - it's vice versa. What should I do?
    Game_2017-08-03_12-37-25.png RPGMV_2017-08-03_13-18-06.png
    Game_2017-08-04_01-02-18.png
    RPGMV_2017-08-04_01-05-00.png
    Another thing I noticed: YF's plugin also allows pitch variance each time a letter sound (SE) is played. With your plugin turned on it doesn't work, there is no variance.
     
    Last edited: Aug 4, 2017
    #52
  13. Fornoreason1000

    Fornoreason1000 Black Sheep Veteran

    Messages:
    199
    Likes Received:
    92
    Location:
    Anor Londo
    First Language:
    English
    Primarily Uses:
    RMMV
    Ok I already know the first problem( dayum i hate that thing, such a useless error).
    I tested that event in my newer unreleased version and it works.

    Keep in mind that with my plugin enabled, save BGM and replay BGM in this case aren't necessary. for performance reasons (like lag) the BGM is kept in memory and will play automatically when the ME ends. This is the same in MV without the plugin.


    second problem i have to look into. I don't use any of YF's plugins yet. if YF's plugin edits AudioManager at all i will have to make a patch.


    your Third problem is that this plugin doesnt support pitches yet.
     
    #53
  14. DarkEspeon

    DarkEspeon Veteran Veteran

    Messages:
    86
    Likes Received:
    14
    First Language:
    Russian
    Primarily Uses:
    RMMV
    Oh, then I'll be eagerly waiting for a new version <3

    And thanks for the heads up about save/replay BGM. I actually wanted to use it because during saving the game I want music to actually fade out, and then to continue after saving. I thought it'd work... But sadly it just doesn't play at all afterwards, or simply starts from the beginning, so I gave up on that idea.
     
    #54
  15. DrJDorian

    DrJDorian Take Your Heart Member

    Messages:
    11
    Likes Received:
    0
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    This happens to me too! But what makes it crash is the Yanfly's Battle Engine Core. Any idea of how to fix it?
     
    #55
  16. DarkEspeon

    DarkEspeon Veteran Veteran

    Messages:
    86
    Likes Received:
    14
    First Language:
    Russian
    Primarily Uses:
    RMMV
    Battle Core does nothing for me. With it turned on or off and HTML5 forcing set to true - everything still works, minus pitch variance. You sure about what you found?
    In any case - could we maybe get YanFly here? That would be helpful
     
    Last edited: Aug 9, 2017
    #56
  17. DrJDorian

    DrJDorian Take Your Heart Member

    Messages:
    11
    Likes Received:
    0
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    And if I have the "PreLoad Manager" plugin activated, it crashes too. With a different error tho
     
    #57
  18. DarkEspeon

    DarkEspeon Veteran Veteran

    Messages:
    86
    Likes Received:
    14
    First Language:
    Russian
    Primarily Uses:
    RMMV
    I am not sure why you'd need that manager, if this plugin in a thread of which we're currently chatting already does everything (?) we need.
     
    #58
  19. DrJDorian

    DrJDorian Take Your Heart Member

    Messages:
    11
    Likes Received:
    0
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    Don't know why without it my game keeps lagging a lot
     
    #59
  20. DrJDorian

    DrJDorian Take Your Heart Member

    Messages:
    11
    Likes Received:
    0
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    Tried couple battles having it on and of and it crashes every single time that I have it enabled
     
    #60

Share This Page