Sound problem vampire dawn #453

Closed
kevin556 opened this Issue Apr 22, 2015 · 10 comments

Projects

None yet

5 participants

@kevin556

There is a problem with playing a sound file Rain1.wav, when arriving at the dracula castle a message is displayed : Could not play Rain1 SE No Free channels available.

capture d ecran 2015-04-22 a 16 26 12

Oh and I'm on mac os maverick 10.9.5 on a macbook pro retina

@fdelapena fdelapena added this to the 0.3.1 milestone Apr 29, 2015
@fdelapena
Member

@kevin556 thanks for reporting, could you provide the map number or a savegame near this place to find this particular scene? The castle has a lot of maps.

@Ghabry Ghabry modified the milestone: 0.3.1, 0.4 Sep 6, 2015
@PK512
PK512 commented Nov 1, 2015

The problem ist still existing. This error is not related to a specified map, it's caused by the Common Event 0014:Regen. This event is active every time the hero is outside. It seems that there ist not enough wait time before the sound effect is called again and again. The orginal RPG_RT ignores it, if the sound effect is already playing. But in easyRPG the sound is overlayed.
I think the solution could be this easy: If the command "Play Sound Effect" executes a sound, that is already playing, it should be ignored.

I deactivated the Common events 14-17 to make Vampires Dawn playable for me.But this results in no weather.

@carstene1ns
Member

Thanks for the details.

I think the solution could be this easy: If the command "Play Sound Effect" executes a sound, that is already playing, it should be ignored.

This seems easy, but implementing it will actually cause a bit of work.
Currently, the sounds are played "fire and forget", this means SDL_mixer gets a sound file passed and plays it entirely on it's own on the next free channel.
We would need to maintain a list of which sound is played on which channel and sync it when changes occur (i.e. when a sound effect is over, the channel gets available again and the association needs to be cleared). Same goes for the OpenAL backend.
If this is going to be implemented in game_system.cpp, this would affect all audio backends. However, channel specific data is not easily available then.

@Ghabry
Member
Ghabry commented Nov 1, 2015

This is a high priority task because it's super annoying and not that hard to fix. Thanks for tracking it down.

Just some notes how to fix this (for the devs):
Yeah this needs additional logic in SDLAudio and AlAudio.
They must remember the channel -> filename mapping and then add new functions:

BGS_Finished(callback_function)

callback_function taking a const char* argument which is the filename

Game_System registers BGS_Finished (because the Audio functions have no dependencies on Game_* it must be done in this way) and tracks it this way...

@Ghabry
Member
Ghabry commented Nov 7, 2015

Actually RPG Maker also overlays similiar Sound effects, so this is unrelated with this issue

@Ghabry Ghabry added a commit to Ghabry/easyrpg-player that referenced this issue Nov 7, 2015
@Ghabry Ghabry When the start condition (switch) of a parallel common event is not m…
…et the interpreter is now suspended instead of destroyed. Parallel common events continue where they got suspended the last time. Fixes #453.
c634bba
@Ghabry
Member
Ghabry commented Nov 7, 2015

Wasn't a sound issue at all but an interpreter bug (hooray!) #647

@Ghabry Ghabry added Events Interpreter and removed Audio UX labels Nov 7, 2015
@Ghabry
Member
Ghabry commented Nov 7, 2015

Maybe all interpreter bugs should result in acoustic pain, makes them easier to detect :D

@Ghabry Ghabry added a commit to Ghabry/easyrpg-player that referenced this issue Nov 7, 2015
@Ghabry Ghabry When the start condition (switch) of a parallel common event is not m…
…et the interpreter is now suspended instead of destroyed. Parallel common events continue where they got suspended the last time. Fixes #453.
1267627
@Ghabry Ghabry added a commit that closed this issue Nov 8, 2015
@Ghabry Ghabry When the start condition (switch) of a parallel common event is not m…
…et the interpreter is now suspended instead of destroyed. Parallel common events continue where they got suspended the last time. Fixes #453.
1267627
@Ghabry Ghabry closed this in 1267627 Nov 8, 2015
@carstene1ns
Member

Got a mail report about this today, either this has regressed or the user has an old version...

@Ghabry Ghabry reopened this Feb 16, 2016
@fdelapena fdelapena modified the milestone: 0.4.1, 0.4 Feb 16, 2016
@Ghabry Ghabry added Savegames and removed Events labels Feb 16, 2016
@Ghabry
Member
Ghabry commented Feb 16, 2016

I'm quite certain this is #757

The bug is triggered when the interpreter is in a Loop and when the saving occurs while the interpreter is at "Repeat loop" it will leave the loop :(

@Ghabry
Member
Ghabry commented Feb 16, 2016

Closing this bug again because the real issue was fixed and was only retriggered because of another bug.

@Ghabry Ghabry closed this Feb 16, 2016
@carstene1ns carstene1ns added Events and removed Events Interpreter labels Jul 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment