Play sounds in a forced pitch (e.g. A_PlaySoundPitched)

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: Play sounds in a forced pitch (e.g. A_PlaySoundPitched)

Re: Play sounds in a forced pitch (e.g. A_PlaySoundPitched)

by Major Cooke » Thu Jul 25, 2019 9:44 am

As well as a starting pitch for A_PlaySound directly, too.

I shouldn't have to say this but some people asked me about A_PlaySoundEx, and failed to realized it's deprecated: No. Never. Deprecated means it's no longer going to be updated. End of story. Use A_PlaySound instead.

Re: Play sounds in a forced pitch (e.g. A_PlaySoundPitched)

by Blue Shadow » Thu Jul 25, 2019 4:46 am

A_PlaySound has been extended with a pitch parameter. A setter function has also been added.
https://github.com/coelckers/gzdoom/com ... 22c2eda5e8

Play sounds in a forced pitch (e.g. A_PlaySoundPitched)

by XxMiltenXx » Sat Dec 30, 2017 10:13 am

Well, as the title says, I'd like a function where you can specify and force the pitch the sound is played at. Not a fancy way, just changing the sample rate as ZDoom already does.

Maybe it could be done as an extension to the original A_PlaySound:

A_PlaySound(sound whattoplay = "weapons/pistol", int slot = CHAN_BODY, double volume = 1.0, bool looping = false, double attenuation = ATTN_NORM, bool local = false, double pitch = 1.0, bool randompitch = true);

So a pitch of 0.5 would half the sample rate, and randompitch determines whether the random pitching (if enabled and set in SNDINFO) should still be factored in on top of it.

Top