Oolite
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 "OOFoundation.h"
29#import "OOSoundSource.h"
30
31@class OOMusic;
32
33#define OOLITE_ITUNES_SUPPORT OOLITE_MAC_COCOA_UI
34
35typedef enum {
39
40#if OOLITE_ITUNES_SUPPORT
42#else
44#endif
46
47@interface OOMusicController : NSObject {
48@private
50 NSString* _missionMusic;
52 uint8_t _special;
53}
54
55+ (OOMusicController*)sharedController;
56
57- (void)playMusicNamed:(NSString*)name loop:(BOOL)loop;
58- (void)playMusicNamed:(NSString*)name loop:(BOOL)loop gain:(float)gain;
59
60- (void)playThemeMusic;
61- (void)playDockingMusic;
62- (void)playDockedMusic;
63
64- (void)setMissionMusic:(NSString*)missionMusicName;
65- (void)playMissionMusic;
66
67- (void)justStop;
68- (void)stop;
69- (void)stopMusicNamed:(NSString*)name; // Stop only if name == playingMusic
70- (void)stopThemeMusic;
71- (void)stopDockingMusic;
72- (void)stopMissionMusic;
73
74- (void)toggleDockingMusic; // Start docking music if none playing, stop docking music if currently playing docking music.
75
76- (OOSoundSource*)soundSource;
77
78- (NSString*)playingMusic;
79- (BOOL)isPlaying;
80
82- (void)setMode:(OOMusicMode)mode;
83
84@end
OOMusicMode
@ kOOMusicOn
@ kOOMusicITunes
@ kOOMusicOff
@ kOOMusicModeMax
const char int mode
Definition ioapi.h:125