CHAN_LOOP is missing from ESoundFlags

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Marrub
 
 
Posts: 1192
Joined: Tue Feb 26, 2013 2:48 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Arch Linux
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

CHAN_LOOP is missing from ESoundFlags

Post by Marrub »

The CHAN_LOOP flag works correctly, but ESoundFlags doesn't have it! You have to use the number 256 manually to use it:

Code: Select all

enum ESoundFlags
{
	CHAN_AUTO = 0,
	CHAN_WEAPON = 1,
	CHAN_VOICE = 2,
	CHAN_ITEM = 3,
	CHAN_BODY = 4,
	CHAN_5 = 5,
	CHAN_6 = 6,
	CHAN_7 = 7,
	
	// modifier flags
	CHAN_LISTENERZ = 8,
	CHAN_MAYBE_LOCAL = 16,
	CHAN_UI = 32,
	CHAN_NOPAUSE = 64,
	// CHAN_LOOP should be here, but it isn't
	CHAN_PICKUP = (CHAN_ITEM|CHAN_MAYBE_LOCAL),
	CHAN_NOSTOP = 4096
};
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: CHAN_LOOP is missing from ESoundFlags

Post by _mental_ »

This might be intentional.
A_PlaySound() and A_PlaySoundEx() functions have a dedicated argument for that.
Are you using this flag with S_Sound() function?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: CHAN_LOOP is missing from ESoundFlags

Post by Graf Zahl »

The thing is that A_PlaySound contains special code for handling looped sounds, like not restarting it if it's already playing. So when the flags were initially exported it was simply not needed.
User avatar
Marrub
 
 
Posts: 1192
Joined: Tue Feb 26, 2013 2:48 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Arch Linux
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: CHAN_LOOP is missing from ESoundFlags

Post by Marrub »

_mental_ wrote:Are you using this flag with S_Sound() function?
Yeah, particularly for making a looping UI sound while in an intermission screen, which works great besides having to or a magic number. :P
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: CHAN_LOOP is missing from ESoundFlags

Post by _mental_ »

Added in 1bcbdf9.
Post Reply

Return to “Closed Bugs [GZDoom]”