I just made a final change to the newly added ZScript sound API for unlimited sound channels:
A_StartSound had two boolean parameters that are now folded into the flag word.
- the looping flag is identical with passing 'CHANF_LOOP|CHANF_NOSTOP', so now these two flags need to be set instead. There's a convenience definition of CHANF_LOOPING that does this with one value
- the local flag must now be specifed as CHANF_LOCAL.
As a result of this change, all code from the last two weeks that used A_StartSound needs to be reviewed! If optional parameters are omitted this is very likely to produce incorrect results without a compiler error!
In addition, all internal code still using A_PlaySound has been converted to A_StartSound and A_PlaySound officially been deprecated.
Important notice:A_StartSound and deprecation of A_PlaySound
Moderator: GZDoom Developers
-
- Lead GZDoom+Raze Developer
- Posts: 49130
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
-
-
- Posts: 17454
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: Important notice:A_StartSound and deprecation of A_PlayS
Thank you for this amazing new feature (unlimited sound channels per actor).
-
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Re: Important notice:A_StartSound and deprecation of A_PlayS
Sweet.
Does this mean we can plug in any arbitrary number for the channel parameter, or is this just in reference to the effective result of CHANF_OVERLAP?
Does this mean we can plug in any arbitrary number for the channel parameter, or is this just in reference to the effective result of CHANF_OVERLAP?
-
- Lead GZDoom+Raze Developer
- Posts: 49130
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Important notice:A_StartSound and deprecation of A_PlayS
You can plug in any number, except 0 and -1.
0 is still CHAN_AUTO and -1 is being used by some function as a "don't care" substitute when checking state.
0 is still CHAN_AUTO and -1 is being used by some function as a "don't care" substitute when checking state.