A_StartSound startTime
Moderator: GZDoom Developers
A_StartSound startTime
https://github.com/coelckers/gzdoom/pull/1047
This allows to start a sound at an arbitrary position, instead of always at the beginning. This is a port of Nash's work from the older sound code before the ZMusic refactor.
Nash's sample mod for this is here. (old sample, will not work anymore, see attachment)
Based on Nash's sample, I also updated it to use A_StartSound for the test, as well, since A_PlaySound got deprecated:
This allows to start a sound at an arbitrary position, instead of always at the beginning. This is a port of Nash's work from the older sound code before the ZMusic refactor.
Nash's sample mod for this is here. (old sample, will not work anymore, see attachment)
Based on Nash's sample, I also updated it to use A_StartSound for the test, as well, since A_PlaySound got deprecated:
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: A_StartSound startTime
Why did you add the new parameter to the deprecated A_PlaySound function? Let's keep it deprecated and not expand it.
Re: A_StartSound startTime
Sorry - it was this PR's roots... it originated before the deprecation. Will remove.
Re: A_StartSound startTime
Yeah, the old one was made before the A_StartSound deprecation. Rachael's implementation is new.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: A_StartSound startTime
It looks like it was removed from the wrong function internally, the change seems to be on A_StartSound, not A_PlaySound
Re: A_StartSound startTime
Oh, that'll show me to code before bedtime...
Fixed.
Fixed.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: A_StartSound startTime
Did you forget to push?
Re: A_StartSound startTime
Oops, seems I did.
- Rip and Tear
- Posts: 187
- Joined: Tue May 02, 2017 3:54 pm
Re: A_StartSound startTime
It may be worth having a special value (-1?) that starts the sound at the sound's LOOP_START marker (https://zdoom.org/wiki/Audio_loop)