Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
e51f9ecf
Commit
e51f9ecf
authored
Aug 20, 2018
by
Marco Z
Browse files
Options
Downloads
Patches
Plain Diff
* Allow S_ChangeMusic to queue the same track for fading
* StopDigSong upon running queue so that GME works for queueing
parent
fb0d1b45
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/s_sound.c
+28
-32
28 additions, 32 deletions
src/s_sound.c
src/sdl/mixer_sound.c
+10
-6
10 additions, 6 deletions
src/sdl/mixer_sound.c
with
38 additions
and
38 deletions
src/s_sound.c
+
28
−
32
View file @
e51f9ecf
...
...
@@ -1400,11 +1400,9 @@ void S_ChangeMusicWithFade(const char *mmusic, UINT16 mflags, boolean looping, U
return
;
}
if
(
strncmp
(
music_name
,
newmusic
,
6
))
{
if
(
S_MusicExists
(
newmusic
,
false
,
true
)
&&
!
nodigimusic
&&
!
digital_disabled
)
// digmusic?
{
if
(
prefadems
)
//have to queue post-fade
if
(
prefadems
)
//have to queue post-fade
// allow even if the music is the same
{
I_FadeOutStopMusic
(
prefadems
);
I_QueueDigSongPostFade
(
newmusic
,
mflags
&
MUSIC_TRACKMASK
,
looping
,
position
,
fadeinms
);
...
...
@@ -1417,7 +1415,7 @@ void S_ChangeMusicWithFade(const char *mmusic, UINT16 mflags, boolean looping, U
music_handle
=
0
;
return
;
}
else
else
if
(
strncmp
(
music_name
,
newmusic
,
6
))
{
S_StopMusic
();
if
(
!
S_DigMusic
(
newmusic
,
looping
))
...
...
@@ -1425,9 +1423,10 @@ void S_ChangeMusicWithFade(const char *mmusic, UINT16 mflags, boolean looping, U
CONS_Alert
(
CONS_ERROR
,
M_GetText
(
"Music lump %.6s not found!
\n
"
),
newmusic
);
return
;
}
I_SetSongTrack
(
mflags
&
MUSIC_TRACKMASK
);
}
}
else
if
(
S_MusicExists
(
newmusic
,
true
,
false
)
&&
!
nomidimusic
&&
!
music_disabled
)
// midimusic?
else
if
(
strncmp
(
music_name
,
newmusic
,
6
)
&&
S_MusicExists
(
newmusic
,
true
,
false
)
&&
!
nomidimusic
&&
!
music_disabled
)
// midimusic?
{
// HACK: We don't support fade for MIDI right now, so
// just fall to old behavior verbatim. This technically should be implemented in
...
...
@@ -1443,9 +1442,6 @@ void S_ChangeMusicWithFade(const char *mmusic, UINT16 mflags, boolean looping, U
}
}
I_SetSongTrack
(
mflags
&
MUSIC_TRACKMASK
);
}
musictype_t
S_MusicType
()
{
return
I_MusicType
();
...
...
This diff is collapsed.
Click to expand it.
src/sdl/mixer_sound.c
+
10
−
6
View file @
e51f9ecf
...
...
@@ -527,7 +527,10 @@ static void run_queue()
{
if
(
queue_stopafterfade
)
I_StopDigSong
();
else
if
(
queue_music_name
[
0
]
&&
I_StartDigSong
(
queue_music_name
,
queue_looping
))
else
if
(
queue_music_name
[
0
])
{
I_StopDigSong
();
if
(
I_StartDigSong
(
queue_music_name
,
queue_looping
))
{
I_SetSongTrack
(
queue_track
);
if
(
queue_fadeinms
)
...
...
@@ -535,6 +538,7 @@ static void run_queue()
if
(
queue_position
)
I_SetMusicPosition
(
queue_position
);
}
}
queuecleanup
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment