Subversion Repositories Games.Descent

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 pmbaty 1
/*
2
 * Portions of this file are copyright Rebirth contributors and licensed as
3
 * described in COPYING.txt.
4
 * Portions of this file are copyright Parallax Software and licensed
5
 * according to the Parallax license below.
6
 * See COPYING.txt for license details.
7
 
8
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
9
SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
10
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
11
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
12
IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
13
SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
14
FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
15
CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
16
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
17
COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
18
*/
19
 
20
#pragma once
21
 
22
#define RBA_MEDIA_CHANGED       -1
23
 
24
#ifdef __cplusplus
25
#include <SDL_version.h>
26
 
27
namespace dcx {
28
 
29
#if SDL_MAJOR_VERSION == 1
30
struct RBACHANNELCTL
31
{
32
        unsigned int out0in, out0vol;
33
        unsigned int out1in, out1vol;
34
        unsigned int out2in, out2vol;
35
        unsigned int out3in, out3vol;
36
};
37
#endif
38
 
39
extern void RBAInit(void);
40
extern void RBAExit();
41
#if SDL_MAJOR_VERSION == 1
42
extern long RBAGetDeviceStatus(void);
43
#endif
44
extern int RBAPlayTrack(int track);
45
extern int RBAPlayTracks(int first, int last, void (*hook_finished)(void));     //plays tracks first through last, inclusive
46
extern int RBACheckMediaChange();
47
extern long     RBAGetHeadLoc(int *min, int *sec, int *frame);
48
extern int      RBAPeekPlayStatus(void);
49
extern void RBAStop(void);
50
extern void RBAEjectDisk(void);
51
#if SDL_MAJOR_VERSION == 1
52
extern void RBASetStereoAudio(RBACHANNELCTL *channels);
53
extern void RBASetQuadAudio(RBACHANNELCTL *channels);
54
extern void RBAGetAudioInfo(RBACHANNELCTL *channels);
55
extern void RBASetChannelVolume(int channel, int volume);
56
#endif
57
#if defined(__linux__) || SDL_MAJOR_VERSION != 1
58
extern void RBASetVolume(int volume);
59
#else
60
static inline void RBASetVolume(int)
61
{
62
}
63
#endif
64
 
65
extern int      RBAEnabled(void);
66
#if SDL_MAJOR_VERSION == 1
67
extern void RBADisable(void);
68
extern void RBAEnable(void);
69
#endif
70
extern int      RBAGetNumberOfTracks(void);
71
extern void RBACheckFinishedHook();
72
extern void     RBAPause();
73
extern int      RBAResume();
74
extern int      RBAPauseResume();
75
 
76
//return the track number currently playing.  Useful if RBAPlayTracks() 
77
//is called.  Returns 0 if no track playing, else track number
78
int RBAGetTrackNum();
79
 
80
// get the cddb discid for the current cd.
81
unsigned long RBAGetDiscID();
82
 
83
// List the tracks on the CD
84
void RBAList(void);
85
 
86
#endif
87
 
88
}