mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Remove dsound stuff
This commit is contained in:
parent
1b5727c790
commit
5b61168605
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
//
|
||||
|
||||
#include <SDL.h>
|
||||
#include <dsound.h>
|
||||
#include <stdio.h>
|
||||
#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.
|
||||
|
5
sound.h
5
sound.h
@ -4,6 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
#include <Windows.h>
|
||||
#include <SDL_mixer.h>
|
||||
|
||||
|
||||
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user