A_StartSound startTime

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: A_StartSound startTime

Re: A_StartSound startTime

by Rip and Tear » Wed Mar 04, 2020 9:00 am

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)

Re: A_StartSound startTime

by Rachael » Mon Mar 02, 2020 2:17 pm

Oops, seems I did.

Re: A_StartSound startTime

by Graf Zahl » Mon Mar 02, 2020 10:35 am

Did you forget to push?

Re: A_StartSound startTime

by Rachael » Mon Mar 02, 2020 6:13 am

Oh, that'll show me to code before bedtime...

Fixed.

Re: A_StartSound startTime

by Graf Zahl » Mon Mar 02, 2020 3:27 am

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

by Nash » Mon Mar 02, 2020 3:13 am

Yeah, the old one was made before the A_StartSound deprecation. Rachael's implementation is new.

Re: A_StartSound startTime

by Rachael » Mon Mar 02, 2020 1:12 am

Sorry - it was this PR's roots... it originated before the deprecation. Will remove.

Re: A_StartSound startTime

by Graf Zahl » Mon Mar 02, 2020 1:03 am

Why did you add the new parameter to the deprecated A_PlaySound function? Let's keep it deprecated and not expand it.

A_StartSound startTime

by Rachael » Mon Mar 02, 2020 12:59 am

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:
a_playsound_start_time_test-2.zip
(17.39 KiB) Downloaded 60 times

Top