Oolite 1.91.0.7604-240417-a536cbe
Loading...
Searching...
No Matches
OOMusicController.h
Go to the documentation of this file.
1/*
2
3OOMusicController.h
4
5Singleton controller for music playback.
6
7
8Oolite
9Copyright (C) 2004-2013 Giles C Williams and contributors
10
11This program is free software; you can redistribute it and/or
12modify it under the terms of the GNU General Public License
13as published by the Free Software Foundation; either version 2
14of the License, or (at your option) any later version.
15
16This program is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19GNU General Public License for more details.
20
21You should have received a copy of the GNU General Public License
22along with this program; if not, write to the Free Software
23Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
24MA 02110-1301, USA.
25
26*/
27
28#import "OOCocoa.h"
29#import "OOSoundSource.h"
30
31@class OOMusic;
32
33
34#define OOLITE_ITUNES_SUPPORT OOLITE_MAC_OS_X
35
36
37typedef enum
38{
42
43#if OOLITE_ITUNES_SUPPORT
45#else
47#endif
49
50
51@interface OOMusicController: NSObject
52{
53@private
55 NSString *_missionMusic;
57 uint8_t _special;
58}
59
60+ (OOMusicController *) sharedController;
61
62- (void) playMusicNamed:(NSString *)name loop:(BOOL)loop;
63- (void) playMusicNamed:(NSString *)name loop:(BOOL)loop gain:(float)gain;
64
65- (void) playThemeMusic;
66- (void) playDockingMusic;
67- (void) playDockedMusic;
68
69- (void) setMissionMusic:(NSString *)missionMusicName;
70- (void) playMissionMusic;
71
72- (void) justStop;
73- (void) stop;
74- (void) stopMusicNamed:(NSString *)name; // Stop only if name == playingMusic
75- (void) stopThemeMusic;
76- (void) stopDockingMusic;
77- (void) stopMissionMusic;
78
79- (void) toggleDockingMusic; // Start docking music if none playing, stop docking music if currently playing docking music.
80
81- (OOSoundSource *) soundSource;
82
83- (NSString *) playingMusic;
84- (BOOL) isPlaying;
85
87- (void) setMode:(OOMusicMode)mode;
88
89
90@end
OOMusicMode
@ kOOMusicOn
@ kOOMusicITunes
@ kOOMusicOff
@ kOOMusicModeMax
const char int mode
Definition ioapi.h:133