WaitMusicEnd(id) will be possible

Feature requests for future versions of Hollywood can be voiced here
Post Reply
User avatar
Juan Carlos
Posts: 887
Joined: Mon Sep 06, 2010 1:02 pm

WaitMusicEnd(id) will be possible

Post 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.
Flinx
Posts: 188
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Re: WaitMusicEnd(id) will be possible

Post 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
Last edited by Flinx on Wed Sep 14, 2022 12:18 pm, edited 2 times in total.
User avatar
Juan Carlos
Posts: 887
Joined: Mon Sep 06, 2010 1:02 pm

Re: WaitMusicEnd(id) will be possible

Post 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.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: WaitMusicEnd(id) will be possible

Post 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().
Flinx
Posts: 188
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Re: WaitMusicEnd(id) will be possible

Post 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
User avatar
Juan Carlos
Posts: 887
Joined: Mon Sep 06, 2010 1:02 pm

Re: WaitMusicEnd(id) will be possible

Post 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.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: WaitMusicEnd(id) will be possible

Post by airsoftsoftwair »

Code: Select all

- New: Added WaitMusicEnd(); this will block the script execution until the specified music has finished playing
User avatar
Juan Carlos
Posts: 887
Joined: Mon Sep 06, 2010 1:02 pm

Re: WaitMusicEnd(id) will be possible

Post 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.
Flinx
Posts: 188
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Re: WaitMusicEnd(id) will be possible

Post 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).
Post Reply