Page 1 of 1

WaitMusicEnd(id) will be possible

Posted: Mon Sep 12, 2022 1:44 pm
by Juan Carlos
It will be possible the equivalent to WaitSampleEnd(id) for the samples, the WaitMusicEnd(id) for the background music, though to use with presentations like title while the background music play and when it finish to play go to next presentation for example.
Thanks.

Re: WaitMusicEnd(id) will be possible

Posted: Wed Sep 14, 2022 11:55 am
by Flinx
You can try the OnMusicEnd event, something like

Code: Select all

InstallEventHandler({OnMusicEnd = p_ToNextPresentation})
Because I got a problem with this event handler in my music player (maybe my program structure is not clean, I remember to get problems when manual close the music and open the next), at the moment I use polling in the main interval function

Code: Select all

If HaveObject(#MUSIC, 1)
	If Not IsMusicPlaying(1)
Ralf

Re: WaitMusicEnd(id) will be possible

Posted: Wed Sep 14, 2022 12:03 pm
by Juan Carlos
Yes, I use this way for my experiment game Sabrina SS, but now with my current proyect is more easy this instruction, show the text effect wait the end music and jump to next presentation.

Re: WaitMusicEnd(id) will be possible

Posted: Sun Sep 18, 2022 11:18 am
by airsoftsoftwair
Flinx wrote: Wed Sep 14, 2022 11:55 am Because I got a problem with this event handler in my music player (maybe my program structure is not clean, I remember to get problems when manual close the music and open the next)
Is that problem still there? This should have been fixed in 9.1 according to the thread.
Juan Carlos wrote: Mon Sep 12, 2022 1:44 pm It will be possible the equivalent to WaitSampleEnd(id) for the samples, the WaitMusicEnd(id) for the background music, though to use with presentations like title while the background music play and when it finish to play go to next presentation for example.
Thanks.
Could be added for consistency with WaitSampleEnd().

Re: WaitMusicEnd(id) will be possible

Posted: Sun Sep 18, 2022 11:42 am
by Flinx
airsoftsoftwair wrote: Sun Sep 18, 2022 11:18 am Is that problem still there? This should have been fixed in 9.1 according to the thread.
I am not sure, maybe I was happy to have the program stable and did not test enough. I will try again.

Ralf

Re: WaitMusicEnd(id) will be possible

Posted: Mon Sep 19, 2022 10:46 am
by Juan Carlos
airsoftsoftwair wrote: Sun Sep 18, 2022 11:18 am
Flinx wrote: Wed Sep 14, 2022 11:55 am Because I got a problem with this event handler in my music player (maybe my program structure is not clean, I remember to get problems when manual close the music and open the next)
Is that problem still there? This should have been fixed in 9.1 according to the thread.
Juan Carlos wrote: Mon Sep 12, 2022 1:44 pm It will be possible the equivalent to WaitSampleEnd(id) for the samples, the WaitMusicEnd(id) for the background music, though to use with presentations like title while the background music play and when it finish to play go to next presentation for example.
Thanks.
Could be added for consistency with WaitSampleEnd().
Yes, I used the trick to load the music like a sample to do this visual effect, it is is simple, perhaps it will be useful for Designer presentations.

Re: WaitMusicEnd(id) will be possible

Posted: Mon Jan 02, 2023 10:18 pm
by airsoftsoftwair

Code: Select all

- New: Added WaitMusicEnd(); this will block the script execution until the specified music has finished playing

Re: WaitMusicEnd(id) will be possible

Posted: Tue Jan 03, 2023 11:27 am
by Juan Carlos
airsoftsoftwair wrote: Mon Jan 02, 2023 10:18 pm

Code: Select all

- New: Added WaitMusicEnd(); this will block the script execution until the specified music has finished playing
Thank you for this new feature perfect to make demos or e-Cards too.

Re: WaitMusicEnd(id) will be possible

Posted: Mon Jul 10, 2023 5:03 pm
by Flinx
airsoftsoftwair wrote: Sun Sep 18, 2022 11:18 am Is that problem still there? This should have been fixed in 9.1 according to the thread.
I'm late, but now I have reactivated the event for some time and it seems to work without problems. The only interesting effect is that I now get the event at the expected end even if I change the playing position just before the end, one second or so. But this is no real problem, and with the polling version I did have similar effects that did need a workaround (playing stops, #ATTRPOSITION is zero but IsMusicPlaying() is True).