Mercurial > sdl-ios-xcode
annotate src/cdrom/macosx/CDPlayer.h @ 1215:d082d2d66ec8
Added support for parsing /etc/fb.modes, based on Stephane Marchesin's patch
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 02 Jan 2006 09:08:05 +0000 |
parents | 08b7fc2b5225 |
children | d910939febfa |
rev | line source |
---|---|
613
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 /* |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
769
b8d311d90021
Updated copyright information for 2004 (Happy New Year!)
Sam Lantinga <slouken@libsdl.org>
parents:
768
diff
changeset
|
3 Copyright (C) 1997-2004 Sam Lantinga |
613
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
6 modify it under the terms of the GNU Library General Public |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
8 version 2 of the License, or (at your option) any later version. |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
9 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
13 Library General Public License for more details. |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
14 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Library General Public |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
16 License along with this library; if not, write to the Free |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
18 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
19 Sam Lantinga |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
20 slouken@libsdl.org |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
21 */ |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
22 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
23 #ifndef __CDPlayer__H__ |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
24 #define __CDPlayer__H__ 1 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
25 |
752
4bb432a0f6e0
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
613
diff
changeset
|
26 #include <string.h> |
4bb432a0f6e0
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
613
diff
changeset
|
27 |
768
de1b2c3063b9
Max has been reworking this code so it works on MacOS X 10.1
Sam Lantinga <slouken@libsdl.org>
parents:
752
diff
changeset
|
28 #include <Carbon/Carbon.h> |
613
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
29 #include <CoreFoundation/CoreFoundation.h> |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
30 #include <AudioUnit/AudioUnit.h> |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
31 |
752
4bb432a0f6e0
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
613
diff
changeset
|
32 #include "SDL.h" |
775
08b7fc2b5225
Fixed playback problems with MacOSX 10.1
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
33 #include "SDL_thread.h" |
08b7fc2b5225
Fixed playback problems with MacOSX 10.1
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
34 #include "SDL_mutex.h" |
613
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
35 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
36 #ifdef __cplusplus |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
37 extern "C" { |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
38 #endif |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
39 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
40 typedef void (*CDPlayerCompletionProc)(SDL_CD *cdrom) ; |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
41 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
42 void Lock (); |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
43 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
44 void Unlock(); |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
45 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
46 int LoadFile (const FSRef *ref, int startFrame, int endFrame); // pass -1 to do nothing |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
47 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
48 int ReleaseFile (); |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
49 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
50 int PlayFile (); |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
51 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
52 int PauseFile (); |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
53 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
54 void SetCompletionProc (CDPlayerCompletionProc proc, SDL_CD *cdrom); |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
55 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
56 int ReadTOCData (FSVolumeRefNum theVolume, SDL_CD *theCD); |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
57 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
58 int ListTrackFiles (FSVolumeRefNum theVolume, FSRef *trackFiles, int numTracks); |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
59 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
60 int DetectAudioCDVolumes (FSVolumeRefNum *volumes, int numVolumes); |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
61 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
62 int GetCurrentFrame (); |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
63 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
64 #ifdef __cplusplus |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
65 }; |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
66 #endif |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
67 |
9c6717a1c66f
Added MacOS X CD-ROM audio support (thanks Max and Darrell)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
68 #endif /* __CD_Player__H__ */ |