2019-08-23 15:15:19 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// Copyright 1993-1996 id Software
|
|
|
|
// Copyright 1999-2016 Randy Heit
|
|
|
|
// Copyright 2002-2016 Christoph Oelckers
|
|
|
|
//
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program. If not, see http://www.gnu.org/licenses/
|
|
|
|
//
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// DESCRIPTION:
|
|
|
|
// The not so system specific sound interface.
|
|
|
|
//
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __S_MUSIC__
|
|
|
|
#define __S_MUSIC__
|
|
|
|
|
|
|
|
#include "doomtype.h"
|
|
|
|
#include "i_soundinternal.h"
|
|
|
|
|
|
|
|
|
|
|
|
void S_ParseMusInfo();
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
void S_InitMusic ();
|
|
|
|
void S_ShutdownMusic ();
|
|
|
|
void S_StartMusic ();
|
|
|
|
|
|
|
|
|
|
|
|
// Start music using <music_name>
|
|
|
|
bool S_StartMusic (const char *music_name);
|
|
|
|
|
|
|
|
// Start music using <music_name>, and set whether looping
|
|
|
|
bool S_ChangeMusic (const char *music_name, int order=0, bool looping=true, bool force=false);
|
|
|
|
|
|
|
|
// Start playing a cd track as music
|
|
|
|
bool S_ChangeCDMusic (int track, unsigned int id=0, bool looping=true);
|
|
|
|
|
|
|
|
void S_RestartMusic ();
|
2019-09-29 23:34:16 +00:00
|
|
|
void S_MIDIDeviceChanged(int newdev, bool force);
|
2019-08-23 15:15:19 +00:00
|
|
|
|
|
|
|
int S_GetMusic (const char **name);
|
|
|
|
|
|
|
|
// Stops the music for sure.
|
|
|
|
void S_StopMusic (bool force);
|
|
|
|
|
|
|
|
// Stop and resume music, during game PAUSE.
|
|
|
|
void S_PauseMusic ();
|
|
|
|
void S_ResumeMusic ();
|
|
|
|
|
|
|
|
//
|
|
|
|
// Updates music & sounds
|
|
|
|
//
|
|
|
|
void S_UpdateMusic ();
|
|
|
|
|
|
|
|
struct MidiDeviceSetting
|
|
|
|
{
|
|
|
|
int device;
|
|
|
|
FString args;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef TMap<FName, FName> MusicAliasMap;
|
|
|
|
typedef TMap<FName, MidiDeviceSetting> MidiDeviceMap;
|
|
|
|
|
|
|
|
extern MusicAliasMap MusicAliases;
|
|
|
|
extern MidiDeviceMap MidiDevices;
|
|
|
|
|
2019-09-29 23:34:16 +00:00
|
|
|
class MusInfo;
|
|
|
|
struct MusPlayingInfo
|
|
|
|
{
|
|
|
|
FString name;
|
|
|
|
MusInfo* handle;
|
|
|
|
int baseorder;
|
|
|
|
bool loop;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern float relative_volume, saved_relative_volume;
|
|
|
|
|
|
|
|
|
2019-08-23 15:15:19 +00:00
|
|
|
#endif
|