Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Richard Gobeille
EDuke32
Commits
0bb5a475
Commit
0bb5a475
authored
Mar 05, 2022
by
Richard Gobeille
Browse files
Duke3d: improve EDUKE32_PREDICT_FALSE usage in S_StopEnvSound() and S_ChangeSoundPitch()
parent
1a291fad
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/duke3d/src/sounds.cpp
View file @
0bb5a475
...
...
@@ -1015,7 +1015,7 @@ int A_PlaySound(int soundNum, int spriteNum)
void
S_StopEnvSound
(
int
soundNum
,
int
spriteNum
)
{
if
(
EDUKE32_PREDICT_FALSE
(
!
S_SoundIsValid
(
soundNum
)
||
g_sounds
[
soundNum
]
==
&
nullsound
||
g_sounds
[
soundNum
]
->
playing
==
0
)
)
if
(
EDUKE32_PREDICT_FALSE
(
!
S_SoundIsValid
(
soundNum
)
)
||
g_sounds
[
soundNum
]
->
playing
==
0
)
return
;
int
j
;
...
...
@@ -1070,7 +1070,7 @@ void S_StopAllSounds(void)
void
S_ChangeSoundPitch
(
int
soundNum
,
int
spriteNum
,
int
pitchoffset
)
{
if
(
EDUKE32_PREDICT_FALSE
(
g_sounds
[
soundNum
]
==
&
nullsound
||
g_sounds
[
soundNum
]
->
playing
==
0
)
)
if
(
EDUKE32_PREDICT_FALSE
(
g_sounds
[
soundNum
]
==
&
nullsound
)
||
g_sounds
[
soundNum
]
->
playing
==
0
)
return
;
for
(
int
j
=
0
;
j
<
MAXSOUNDINSTANCES
;
++
j
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment