DFPlayer Conflict - Inherent Delay Causing Sounds Not to Play
![userHead](https://dfimg.dfrobot.com/dfPortrait2.png)
Hi,
I am working on a project that reproduces all the sounds for a ghostbusters proton pack.
Honestly everything works pretty well except one thing that keeps bugging me.
The above code then looks to see if anything is playing and if nothing is playing it plays an idle noise.
This all works for the most part, but there is a problem, if I press the button as soon as this idle movie loop tries to play, the movie loop always overrides the firing sound. There is a large window where this can happen when the player is off. E.g. blue light is off. (If I play new sounds when the blue light is on or sound is playing its instant, I can change sounds instantaneous).
Looking for a bit of guidance.
THanks!
I am working on a project that reproduces all the sounds for a ghostbusters proton pack.
Honestly everything works pretty well except one thing that keeps bugging me.
Code: Select all
Simply the sound works as such, you hit a button and it plays a firing sound, then when you stop it plays a another sound of the weapon stopping. if (IsPlaying == true && musicmode == false && WANDLEDSTATUS == NORMAL)
{
myDFPlayer.loop(IdleMovieLoop);
}
The above code then looks to see if anything is playing and if nothing is playing it plays an idle noise.
This all works for the most part, but there is a problem, if I press the button as soon as this idle movie loop tries to play, the movie loop always overrides the firing sound. There is a large window where this can happen when the player is off. E.g. blue light is off. (If I play new sounds when the blue light is on or sound is playing its instant, I can change sounds instantaneous).
Looking for a bit of guidance.
THanks!