Commit graph

107 commits

Author SHA1 Message Date
mazmazz
de47ab63f2 MP Core Mixer fade: Use fixed instead of double calc (fixes buildbots) 2018-09-19 19:40:24 -04:00
mazmazz
494c5290cf MP Core Mixer: Unused param fixes (buildbots) 2018-09-19 18:26:59 -04:00
mazmazz
f99b6a89ed Mixer: Add back var_cleanup in I_LoadSong
Because musicplus-libopenmpt deleted it, I added a cautionary note to ALWAYS clean up your vars!
2018-09-18 22:15:53 -04:00
mazmazz
67566f9a2f Mixer I_StopSong: StopFadingSong and var_cleanup call fix 2018-09-18 12:51:42 -04:00
mazmazz
45dbadbbc2 Mixer: Add missing tag declarations in I_LoadSong 2018-09-15 01:14:24 -04:00
mazmazz
9eb39fb025 Merge branch 'music-cleanup' into musicplus-core 2018-09-15 00:46:02 -04:00
mazmazz
30b8408c10 Mixer: HAVE_LIBGME ifdef in I_LoadSong 2018-09-15 00:34:55 -04:00
mazmazz
20bde0d21c Fix Windows buildbot for MP3_MAD/MODPLUG define (the header we use is 2.0.2)
(cherry picked from commit 9a5eb02459)
2018-09-14 17:48:12 -04:00
mazmazz
5b724e18b5 Mixer: Better MODPLUG/MP3_MAD defines 2018-09-14 17:27:00 -04:00
mazmazz
0563d77812 Fix compile errors on buildbots
* Check SDL Mixer 2.0.3 for MUS_MODPLUG_UNUSED, MUS_MP3_MAD_UNUSED
* Mixed D+C in I_LoadSong

(cherry picked from commit fdbe3e80f6)
2018-09-14 17:09:21 -04:00
mazmazz
3a343cf8f1 Don't call I_StartupSound in SFX toggle
* Mixer: make I_StartupSound return early if already set up
* Restartaudio: Add StopSFX call

(cherry picked from commit b330dc2394)
2018-09-14 16:43:48 -04:00
mazmazz
517756606c I_InitMusic SDL2: Don't unload GME indiscriminately
(cherry picked from commit cb4e075137)
2018-09-14 13:57:24 -04:00
mazmazz
a5948c3629 Separate StopMusic and UnloadMusic
(cherry picked from commit e72610a3dc)
2018-09-14 13:57:20 -04:00
mazmazz
db41034ad9 Block song position changes on GME because unstable 2018-09-13 13:27:42 -04:00
mazmazz
5f87f4a47a Don't decrement fade timer if song is paused 2018-09-11 11:20:46 -04:00
mazmazz
5ea8dc3dfa Change to percentage calc from interval decrement for volume fade 2018-09-11 11:17:30 -04:00
mazmazz
75e6ad72ed Fix MIDI looping/non-looping 2018-08-28 10:16:06 -04:00
mazmazz
e88d147761 I_SongPlaying detect GME properly 2018-08-24 18:03:50 -04:00
mazmazz
eae5d3333f Stub I_UnloadSong because we already unload in I_StopMusic
* Stop-gap for now. Ideally the logic would be in the respective places.

# Conflicts:
#	src/sdl/mixer_sound.c
2018-08-24 18:02:46 -04:00
mazmazz
d39b7011c5 Volume fixes
# Conflicts:
#	src/sdl/mixer_sound.c
2018-08-24 18:01:57 -04:00
mazmazz
9d0d101d03 I_SongPlaying detect GME properly 2018-08-24 18:00:39 -04:00
mazmazz
4d91b44c63 Detect GME more simply 2018-08-24 17:58:56 -04:00
mazmazz
bd01c75a4e Stub I_UnloadSong because we already unload in I_StopMusic
* Stop-gap for now. Ideally the logic would be in the respective places.
2018-08-24 17:56:22 -04:00
mazmazz
a688de5dc2 Volume fixes 2018-08-24 17:56:14 -04:00
mazmazz
fb6f8c8a07 A word 2018-08-24 13:41:26 -04:00
mazmazz
df455fc638 Merge branch 'music-cleanup' of https://git.magicalgirl.moe/STJr/SRB2Internal.git into music-cleanup 2018-08-24 13:36:07 -04:00
mazmazz
5f21bf230d GME fix: play song in I_PlaySong, not I_LoadSong 2018-08-24 13:35:41 -04:00
mazmazz
bf61dbb6e2 Checkpoint: Revised fading routines for new load/play pattern
* Perform fade-out/fade-in using callbacks
* Move queued music from interface to s_sound
2018-08-24 13:11:38 -04:00
mazmazz
a2d626384a Merge branch 'music-cleanup' into musicplus-core
Pending rewrite of fade music changing

# Conflicts:
#	src/android/i_sound.c
#	src/djgppdos/i_sound.c
#	src/i_sound.h
#	src/s_sound.c
#	src/s_sound.h
#	src/sdl/mixer_sound.c
#	src/sdl/sdl_sound.c
#	src/win32/win_snd.c
2018-08-23 21:07:39 -04:00
mazmazz
9e6eebeb8d Refactor I_MusicType MusicPlaying and MusicPaused other targets 2018-08-23 20:23:16 -04:00
mazmazz
4b82de9e54 Refactor I_MusicType MusicPlaying and MusicPaused -> I_SongType ... 2018-08-23 20:14:46 -04:00
mazmazz
a7d51bf810 Minor refactoring and reordering
* I_GetMusicType() -> I_MusicType()
* Wrap MIDI volume hack in #ifdef _WIN32
2018-08-23 17:05:37 -04:00
mazmazz
f5f0b5e76c Refactoring, music statues
* S_Init -> S_InitSfxChannels because it did mostly SFX anyway
* S_MusicPlaying, S_MusicPaused, S_MusicName, S_MusicExists new status methods
* I_MusicPlaying, I_MusicPaused
2018-08-23 12:30:47 -04:00
mazmazz
701cc5a7dd Consolidate I_SetDigMusicVolume and I_SetMIDIMusicVolume into one method
* In s_sound, they are merged to one method as well, but there are still two separate digvolume and seqvolume variables
* Simplified Dig/MidiMusicDisabled in s_sound
* Method reordering
2018-08-23 11:54:36 -04:00
mazmazz
55f3803e4b Added I_GetMusicType and removed midimode variable
* Revised S_PlayMusic arguments
* Now music plays again!
2018-08-23 10:18:38 -04:00
mazmazz
e89eccf78e Loose ends from previous work
* Pause/ResumeSong remove handle argument
* LoadSong declare char *data argument
* Variable weirdness
2018-08-23 09:36:51 -04:00
mazmazz
7efab8b314 Revert "Nix'd midimusicvolume", don't know what I want to do with this yet
This reverts commit b5c3095820.

# Conflicts:
#	src/i_sound.h
#	src/s_sound.c
#	src/s_sound.h
#	src/sdl/mixer_sound.c
2018-08-23 09:06:13 -04:00
mazmazz
e42defa299 Playback routines: Load, Play, Pause, Stop, Unload
* Re-purpose I_LoadSong for digital music loading
* I_StartDigSong logic split between I_LoadSong and I_PlaySong
* Pause, Stop, and Unload routines are combined from Digi and MIDI
* music_lumpnum, music_data, music_handle from s_sound.c are gone
2018-08-23 09:02:14 -04:00
mazmazz
b5c3095820 Nix'd midimusicvolume 2018-08-23 07:39:32 -04:00
mazmazz
76f9890328 Position fixes with looppoint 2018-08-21 11:58:38 -04:00
mazmazz
2289a3bd79 I_FadeSongFromLevel -> I_FadeSongFromVolume refactor
* S_MusicName->GetMusicName refactor
* S_ChangeMusicWithFade->ChangeMusicAdvanced refactor
2018-08-21 08:53:51 -04:00
mazmazz
a1b1391e24 Interface name refactor: Music -> Song
* Music refers to the music system, song refers to the entity being played.
* s_sound doesn't follow this, everything is music
2018-08-21 06:22:35 -04:00
mazmazz
17e2c3f5be Debug messages 2018-08-20 08:47:41 -04:00
mazmazz
9539c597dd Midimode safeties for song queueing/fading 2018-08-20 01:14:29 -04:00
mazmazz
9eeed6338f Allow queueing music at end of song, not just fading 2018-08-20 00:12:23 -04:00
mazmazz
e51f9ecf90 * Allow S_ChangeMusic to queue the same track for fading
* StopDigSong upon running queue so that GME works for queueing
2018-08-19 23:20:40 -04:00
mazmazz
2cf49f9361 I_FadeOutStopMusic, I_FadeInStartDigSong, S_ChangeMusicWithFade implementation
* First attempt, a little messy but works fine
2018-08-19 22:05:42 -04:00
mazmazz
b844a908a1 Make S_FadeMusicFromLevel accept mandatory source_volume
* Make S_FadeMusic a legitimate function to grab current internal volume
2018-08-19 17:02:13 -04:00
mazmazz
3d8c4585d4 Checkpoint 2018-08-19 16:25:12 -04:00
mazmazz
918976bdcc S_FadeMusic[FromLevel] and S_StopFadingMusic implementation 2018-08-19 16:19:48 -04:00