2009-07-27 10:46:42 +00:00
|
|
|
/*
|
2016-03-07 11:22:07 +00:00
|
|
|
Copyright (C) 1994-1995 Apogee Software, Ltd.
|
2009-07-27 10:46:42 +00:00
|
|
|
|
2016-03-07 11:22:07 +00:00
|
|
|
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 2
|
|
|
|
of the License, or (at your option) any later version.
|
2009-07-27 10:46:42 +00:00
|
|
|
|
|
|
|
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, write to the Free Software
|
2014-07-20 08:55:56 +00:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2016-03-07 11:22:07 +00:00
|
|
|
|
|
|
|
Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
|
2009-07-27 10:46:42 +00:00
|
|
|
*/
|
2016-03-07 11:22:07 +00:00
|
|
|
/**********************************************************************
|
|
|
|
module: MUSIC.H
|
|
|
|
|
|
|
|
author: James R. Dose
|
|
|
|
date: March 25, 1994
|
|
|
|
|
|
|
|
Public header for MUSIC.C
|
|
|
|
|
|
|
|
(c) Copyright 1994 James R. Dose. All Rights Reserved.
|
|
|
|
**********************************************************************/
|
2009-07-27 10:46:42 +00:00
|
|
|
|
|
|
|
#ifndef __MUSIC_H
|
|
|
|
#define __MUSIC_H
|
|
|
|
|
|
|
|
#include "compat.h"
|
|
|
|
|
2019-10-19 23:47:54 +00:00
|
|
|
extern int MUSIC_ErrorCode;
|
2009-07-27 10:46:42 +00:00
|
|
|
|
|
|
|
enum MUSIC_ERRORS
|
2019-10-19 23:47:29 +00:00
|
|
|
{
|
2019-10-19 23:47:54 +00:00
|
|
|
MUSIC_Warning = -2,
|
|
|
|
MUSIC_Error = -1,
|
|
|
|
MUSIC_Ok = 0,
|
|
|
|
MUSIC_MidiError,
|
2019-10-19 23:47:29 +00:00
|
|
|
};
|
2016-03-07 11:22:07 +00:00
|
|
|
|
|
|
|
typedef struct
|
2019-10-19 23:47:29 +00:00
|
|
|
{
|
|
|
|
uint32_t tickposition;
|
|
|
|
uint32_t milliseconds;
|
|
|
|
uint32_t measure;
|
|
|
|
uint32_t beat;
|
|
|
|
uint32_t tick;
|
|
|
|
} songposition;
|
2009-07-27 10:46:42 +00:00
|
|
|
|
2019-09-19 18:22:09 +00:00
|
|
|
|
2009-07-27 10:46:42 +00:00
|
|
|
#define MUSIC_LoopSong ( 1 == 1 )
|
|
|
|
#define MUSIC_PlayOnce ( !MUSIC_LoopSong )
|
|
|
|
|
2019-10-19 23:47:29 +00:00
|
|
|
#define MUSIC_SetErrorCode(status) MUSIC_ErrorCode = (status);
|
|
|
|
|
2019-10-19 23:47:54 +00:00
|
|
|
extern const char *MUSIC_ErrorString(int ErrorNumber);
|
2019-10-19 23:47:29 +00:00
|
|
|
|
2019-10-19 23:48:20 +00:00
|
|
|
int MUSIC_Init(int SoundCard, int ForceEMIDI = -1);
|
|
|
|
int MUSIC_Shutdown(void);
|
|
|
|
void MUSIC_SetVolume(int volume);
|
|
|
|
int MUSIC_GetVolume(void);
|
|
|
|
void MUSIC_SetLoopFlag(int loopflag);
|
|
|
|
void MUSIC_Continue(void);
|
|
|
|
void MUSIC_Pause(void);
|
|
|
|
int MUSIC_StopSong(void);
|
|
|
|
int MUSIC_PlaySong(char *song, int songsize, int loopflag, const char *fn = nullptr);
|
|
|
|
void MUSIC_Update(void);
|
2009-07-27 10:46:42 +00:00
|
|
|
|
|
|
|
#endif
|