comparison src/cdrom/macosx/CDPlayer.h @ 613:9c6717a1c66f

Added MacOS X CD-ROM audio support (thanks Max and Darrell)
author Sam Lantinga <slouken@libsdl.org>
date Tue, 15 Apr 2003 16:33:56 +0000
parents
children 4bb432a0f6e0
comparison
equal deleted inserted replaced
612:0648505b1f8b 613:9c6717a1c66f
1 /*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the Free
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
19 Sam Lantinga
20 slouken@libsdl.org
21 */
22
23 #ifndef __CDPlayer__H__
24 #define __CDPlayer__H__ 1
25
26 #include <CoreFoundation/CoreFoundation.h>
27 #include <Carbon/Carbon.h>
28
29 #include <AudioUnit/AudioUnit.h>
30 #include <AudioToolbox/AudioToolbox.h>
31
32 #include <SDL.h>
33
34 #include <string.h>
35 #include <unistd.h> // for usleep
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 typedef void (*CDPlayerCompletionProc)(SDL_CD *cdrom) ;
42
43 void Lock ();
44
45 void Unlock();
46
47 int LoadFile (const FSRef *ref, int startFrame, int endFrame); // pass -1 to do nothing
48
49 int ReleaseFile ();
50
51 int PlayFile ();
52
53 int PauseFile ();
54
55 void SetCompletionProc (CDPlayerCompletionProc proc, SDL_CD *cdrom);
56
57 int ReadTOCData (FSVolumeRefNum theVolume, SDL_CD *theCD);
58
59 int ListTrackFiles (FSVolumeRefNum theVolume, FSRef *trackFiles, int numTracks);
60
61 int DetectAudioCDVolumes (FSVolumeRefNum *volumes, int numVolumes);
62
63 int GetCurrentFrame ();
64
65 #ifdef __cplusplus
66 };
67 #endif
68
69 #endif /* __CD_Player__H__ */