From 5b6116860500e513a5c8f83f0ab95002d43c3453 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Sat, 4 Feb 2017 18:01:56 +0100 Subject: [PATCH] Remove dsound stuff --- event.cpp | 2 +- sound.cpp | 6 ++---- sound.h | 5 ++--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/event.cpp b/event.cpp index fb8bd7a..8516e32 100644 --- a/event.cpp +++ b/event.cpp @@ -3128,7 +3128,7 @@ bool CEvent::ChangePhase(UINT phase) { sprintf(filename, "sound\\music%.3d.blp", music-1); m_pSound->StopMusic (); - m_pSound->PlayMusic(m_hWnd, filename); + m_pSound->PlayMusic(filename); } } } diff --git a/sound.cpp b/sound.cpp index fdce4b7..f9e0679 100644 --- a/sound.cpp +++ b/sound.cpp @@ -2,7 +2,6 @@ // #include -#include #include #include "sound.h" #include "event.h" @@ -33,7 +32,6 @@ CSound::CSound() m_bEnable = false; m_bState = false; - m_MidiDeviceID = 0; m_MIDIFilename[0] = 0; m_audioVolume = 20; m_midiVolume = 15; @@ -268,7 +266,7 @@ bool CSound::PlayImage(int channel, POINT pos, int rank) // Uses MCI to play a MIDI file. The window procedure // is notified when playback is complete. -bool CSound::PlayMusic(HWND hWnd, LPSTR lpszMIDIFilename) +bool CSound::PlayMusic(LPSTR lpszMIDIFilename) { char string[MAX_PATH]; @@ -315,7 +313,7 @@ bool CSound::RestartMusic() if ( m_midiVolume == 0 ) return true; if ( m_MIDIFilename[0] == 0 ) return false; - return PlayMusic(m_hWnd, m_MIDIFilename); + return PlayMusic(m_MIDIFilename); } // Shuts down the MIDI player. diff --git a/sound.h b/sound.h index 6b39221..71afd03 100644 --- a/sound.h +++ b/sound.h @@ -4,6 +4,7 @@ #pragma once #include +#include #include @@ -34,7 +35,7 @@ public: bool Play(int channel, int volume=0, Uint8 panLeft = 255, Uint8 panRight = 255); bool PlayImage(int channel, POINT pos, int rank=-1); - bool PlayMusic(HWND hWnd, LPSTR lpszMIDIFilename); + bool PlayMusic(LPSTR lpszMIDIFilename); bool RestartMusic(); void SuspendMusic(); void StopMusic(); @@ -45,14 +46,12 @@ public: bool StopAllSounds(); protected: - HWND m_hWnd; bool m_bEnable; bool m_bState; bool m_bStopped; Mix_Music *m_pMusic; Mix_Chunk *m_lpSDL[MAXSOUND]; short m_channelBlupi[MAXBLUPI]; - UINT m_MidiDeviceID; char m_MIDIFilename[50]; int m_audioVolume; int m_midiVolume;