Subversion Repositories eduke32

Rev

Rev 8257 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1472 terminx 1
/*
5650 hendricks2 2
Copyright (C) 1994-1995 Apogee Software, Ltd.
1472 terminx 3
 
5650 hendricks2 4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License
6
as published by the Free Software Foundation; either version 2
7
of the License, or (at your option) any later version.
1472 terminx 8
 
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
 
13
See the GNU General Public License for more details.
14
 
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
4541 hendricks2 17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
5650 hendricks2 18
 
19
Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
1472 terminx 20
*/
5650 hendricks2 21
/**********************************************************************
22
   module: MUSIC.H
1472 terminx 23
 
5650 hendricks2 24
   author: James R. Dose
25
   date:   March 25, 1994
26
 
27
   Public header for MUSIC.C
28
 
29
   (c) Copyright 1994 James R. Dose.  All Rights Reserved.
30
**********************************************************************/
31
 
1472 terminx 32
#ifndef __MUSIC_H
33
#define __MUSIC_H
34
 
35
#include "compat.h"
36
 
8216 terminx 37
extern int MUSIC_ErrorCode;
1472 terminx 38
 
39
enum MUSIC_ERRORS
8214 terminx 40
{
8216 terminx 41
    MUSIC_Warning = -2,
42
    MUSIC_Error   = -1,
43
    MUSIC_Ok      = 0,
44
    MUSIC_MidiError,
8214 terminx 45
};
1472 terminx 46
 
5650 hendricks2 47
typedef struct
8214 terminx 48
{
49
    uint32_t tickposition;
50
    uint32_t milliseconds;
51
    uint32_t measure;
52
    uint32_t beat;
53
    uint32_t tick;
54
} songposition;
5650 hendricks2 55
 
1472 terminx 56
#define MUSIC_LoopSong ( 1 == 1 )
57
#define MUSIC_PlayOnce ( !MUSIC_LoopSong )
58
 
8214 terminx 59
#define MUSIC_SetErrorCode(status) MUSIC_ErrorCode = (status);
1472 terminx 60
 
8216 terminx 61
extern const char *MUSIC_ErrorString(int ErrorNumber);
8214 terminx 62
 
8257 hendricks2 63
int  MUSIC_Init(int SoundCard);
8219 terminx 64
int  MUSIC_Shutdown(void);
8261 hendricks2 65
int  MIDI_GetDevice(void);
8219 terminx 66
void MUSIC_SetVolume(int volume);
67
int  MUSIC_GetVolume(void);
68
void MUSIC_SetLoopFlag(int loopflag);
69
void MUSIC_Continue(void);
70
void MUSIC_Pause(void);
71
int  MUSIC_StopSong(void);
72
int  MUSIC_PlaySong(char *song, int songsize, int loopflag, const char *fn = nullptr);
73
void MUSIC_Update(void);
8214 terminx 74
 
1472 terminx 75
#endif