Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GameDevWeek
Sommersemester 2015
Cpp
Deth Buff Arr
Commits
38adb804
Commit
38adb804
authored
Sep 27, 2015
by
Georg Schaefer
Browse files
fix crash caused by calling Mix_FadeOutChannel with 0 as the second parameter
parent
fac009c0
Changes
1
Show whitespace changes
Inline
Side-by-side
src/audio/audio.cpp
View file @
38adb804
...
...
@@ -91,7 +91,6 @@ namespace gdw {
if
(
!
sound_ptr
)
{
log
(
log_level
::
error
)
<<
"no sound "
<<
name
<<
" found in audio collection"
<<
std
::
endl
;
}
int
channel
=
Mix_PlayChannel
(
-
1
,
sound_ptr
->
get
(),
loop
);
if
(
channel
<
0
)
{
audio_error
(
"couldn't play sound"
);
...
...
@@ -104,7 +103,7 @@ namespace gdw {
if
(
channel
<
-
1
)
{
return
;
}
Mix_FadeOutChannel
(
channel
,
fade_out
);
Mix_FadeOutChannel
(
channel
,
fade_out
+
1
);
}
void
audio
::
stereo
(
int
channel
,
int
left
,
int
right
)
{
...
...
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