summaryrefslogtreecommitdiff
path: root/include/dolphin/dtk.h
blob: f26619059c0c3a6cdd298b1d9bf2f5da474ff113 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef _DOLPHIN_DTK
#define _DOLPHIN_DTK

#include <dolphin/dvd.h>
#include <dolphin/types.h>

#ifdef __cplusplus
extern "C" {
#endif
typedef void (*DTKCallback)(u32 eventMask);
typedef void (*DTKFlushCallback)(void);

typedef struct DTKTrack {
  struct DTKTrack* prev;
  struct DTKTrack* next;
  char* fileName;
  u32 eventMask;
  DTKCallback callback;
  DVDFileInfo dvdFileInfo;

} DTKTrack;

void DTKInit(void);
void DTKShutdown(void);
u32 DTKQueueTrack(char* fileName, DTKTrack* track, u32 eventMask, DTKCallback callback);
u32 DTKRemoveTrack(DTKTrack* track);
void DTKFlushTracks(DTKFlushCallback callback);
void DTKSetSampleRate(u32 samplerate);
u32 DTKGetSampleRate(void);
void DTKSetInterruptFrequency(u32 samples);
u32 DTKGetInterruptFrequency(void);
void DTKSetRepeatMode(u32 repeat);
u32 DTKGetRepeatMode(void);
void DTKSetState(u32 state);
u32 DTKGetState(void);
void DTKNextTrack(void);
void DTKPrevTrack(void);
u32 DTKGetPosition(void);
DTKTrack* DTKGetCurrentTrack(void);
void DTKSetVolume(u8 left, u8 right);
u16 DTKGetVolume(void);

#ifdef __cplusplus
}
#endif

#endif // _DOLPHIN_DTK