projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f1f9744
)
changed playing music to prevent 'plop' sound for certain music files
author
Holger Schemel
<info@artsoft.org>
Tue, 26 Apr 2016 19:25:59 +0000
(21:25 +0200)
committer
Holger Schemel
<info@artsoft.org>
Tue, 26 Apr 2016 19:25:59 +0000
(21:25 +0200)
src/libgame/sound.c
patch
|
blob
|
history
diff --git
a/src/libgame/sound.c
b/src/libgame/sound.c
index 4831248c86d2b9abc1ef56cf9ad0cd885ebc06c3..e860ba5ad443acd63e2669618d3f7c5e04c0872d 100644
(file)
--- a/
src/libgame/sound.c
+++ b/
src/libgame/sound.c
@@
-219,10
+219,10
@@
static void Mixer_PlayMusicChannel()
if (mixer[audio.music_channel].type != MUS_TYPE_WAV)
{
if (mixer[audio.music_channel].type != MUS_TYPE_WAV)
{
- /* Mix_VolumeMusic() must be called _after_ Mix_PlayMusic() --
- this looks like a bug in the SDL_mixer library */
- Mix_PlayMusic(mixer[audio.music_channel].data_ptr, -1);
+ // use short fade-in to prevent "plop" sound for certain music files
+ // (this may happen when switching on music while playing the game)
Mix_VolumeMusic(mixer[audio.music_channel].volume);
Mix_VolumeMusic(mixer[audio.music_channel].volume);
+ Mix_FadeInMusic(mixer[audio.music_channel].data_ptr, -1, 100);
}
}
}
}