Line data Source code
1 0 : /* 2 : 3 : OOOpenALController.h 4 : 5 : Singleton controller for Open AL interfaces 6 : 7 : Oolite 8 : Copyright (C) 2004-2013 Giles C Williams and contributors 9 : 10 : This program is free software; you can redistribute it and/or 11 : modify it under the terms of the GNU General Public License 12 : as published by the Free Software Foundation; either version 2 13 : of the License, or (at your option) any later version. 14 : 15 : This program is distributed in the hope that it will be useful, 16 : but WITHOUT ANY WARRANTY; without even the implied warranty of 17 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 : GNU General Public License for more details. 19 : 20 : You should have received a copy of the GNU General Public License 21 : along with this program; if not, write to the Free Software 22 : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 23 : MA 02110-1301, USA. 24 : 25 : */ 26 : 27 : #import "OOOpenAL.h" 28 : 29 : 30 0 : static NSString * const kOOLogSoundInitError = @"sound.initialization.error"; 31 0 : static NSString * const kOOLogSoundLoadingSuccess = @"sound.load.success"; 32 0 : static NSString * const kOOLogSoundLoadingError = @"sound.load.error"; 33 : 34 : 35 0 : @interface OOOpenALController : NSObject 36 : { 37 : @private 38 0 : ALCdevice *device; 39 0 : ALCcontext *context; 40 : } 41 : 42 0 : + (OOOpenALController *) sharedController; 43 : 44 0 : - (void) setMasterVolume:(ALfloat) fraction; 45 0 : - (ALfloat) masterVolume; 46 : 47 0 : - (void) shutdown; 48 : 49 : /** 50 : * \ingroup cli 51 : * Scans the command line for -nosound or --nosound arguments. 52 : * 53 : * @return returns the instance to OOOpenALController if sound 54 : * shall be played and can be played, otherwise null 55 : */ 56 1 : - (id) init; 57 : 58 : @end