File diff r7169:b87d36998a2d → r7170:38b143754b40
src/music_gui.cpp
Show inline comments
 
@@ -8,16 +8,16 @@
 
#include "table/sprites.h"
 
#include "functions.h"
 
#include "fileio.h"
 
#include "window.h"
 
#include "gfx.h"
 
#include "sound.h"
 
#include "hal.h"
 
#include "macros.h"
 
#include "variables.h"
 
#include "music.h"
 
#include "music/music_driver.hpp"
 

	
 
static byte _music_wnd_cursong;
 
static bool _song_is_active;
 
static byte _cur_playlist[NUM_SONGS_PLAYLIST];
 

	
 

	
 
@@ -83,26 +83,26 @@ static void SkipToNextSong()
 

	
 
	_song_is_active = false;
 
}
 

	
 
static void MusicVolumeChanged(byte new_vol)
 
{
 
	_music_driver->set_volume(new_vol);
 
	_music_driver->SetVolume(new_vol);
 
}
 

	
 
static void DoPlaySong()
 
{
 
	char filename[MAX_PATH];
 
	FioFindFullPath(filename, lengthof(filename), GM_DIR,
 
			origin_songs_specs[_music_wnd_cursong - 1].filename);
 
	_music_driver->play_song(filename);
 
	_music_driver->PlaySong(filename);
 
}
 

	
 
static void DoStopMusic()
 
{
 
	_music_driver->stop_song();
 
	_music_driver->StopSong();
 
}
 

	
 
static void SelectSongToPlay()
 
{
 
	uint i = 0;
 
	uint j = 0;
 
@@ -175,13 +175,13 @@ void MusicLoop()
 
	} else if (msf.playing && !_song_is_active) {
 
		PlayPlaylistSong();
 
	}
 

	
 
	if (!_song_is_active) return;
 

	
 
	if (!_music_driver->is_song_playing()) {
 
	if (!_music_driver->IsSongPlaying()) {
 
		if (_game_mode != GM_MENU) {
 
			StopMusic();
 
			SkipToNextSong();
 
			PlayPlaylistSong();
 
		} else {
 
			ResetMusic();