French updates
[adiumx.git] / Source / AISoundController.h
blobbd2b66f050c57362f85628bf7ad27a49dd93ccd0
1 /*
2 * Adium is the legal property of its developers, whose names are listed in the copyright file included
3 * with this source distribution.
4 *
5 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
6 * General Public License as published by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
10 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11 * Public License for more details.
13 * You should have received a copy of the GNU General Public License along with this program; if not,
14 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 //Sound Controller
18 #define KEY_SOUND_SET @"Set"
19 #define KEY_SOUND_SET_CONTENTS @"Sounds"
20 #define KEY_SOUND_MUTE @"Mute Sounds"
21 #define KEY_SOUND_TEMPORARY_MUTE @"Mute Sounds Temporarily"
22 #define KEY_SOUND_STATUS_MUTE @"Mute Sounds based on Status"
23 #define KEY_SOUND_USE_CUSTOM_VOLUME @"Use Custom Volume"
24 #define KEY_SOUND_CUSTOM_VOLUME_LEVEL @"Custom Volume Level"
25 #define KEY_USE_SYSTEM_SOUND_OUTPUT @"Use System Sound Output"
26 #define KEY_SOUND_SOUND_DEVICE_TYPE @"Sound Device Type"
28 #define PREF_GROUP_SOUNDS @"Sounds"
29 #define KEY_EVENT_MUTE_WHILE_AWAY @"Mute While Away"
31 @class SUSpeaker;
33 typedef enum{
34 SOUND_SYTEM_OUTPUT_DEVICE = 0,
35 SOUND_SYTEM_ALERT_DEVICE
36 } SoundDeviceType;
38 @interface AISoundController : NSObject {
39 IBOutlet AIAdium *adium;
41 NSMutableDictionary *soundCacheDict;
42 NSMutableArray *soundCacheArray;
43 NSTimer *soundCacheCleanupTimer;
44 BOOL useCustomVolume;
45 BOOL muteSounds;
46 BOOL muteWhileAway;
47 SoundDeviceType soundDeviceType;
48 float customVolume;
50 int activeSoundThreads;
51 BOOL soundThreadActive;
53 NSLock *soundLock;
55 NSMutableDictionary *systemSoundIDDict;
57 NSMutableArray *speechArray;
58 BOOL resetNextTime;
59 BOOL speaking;
60 float defaultRate;
61 float defaultPitch;
63 SUSpeaker *speaker_variableVoice;
64 SUSpeaker *speaker_defaultVoice;
67 //Sounds
68 - (void)playSoundNamed:(NSString *)inName;
69 - (void)playSoundAtPath:(NSString *)inPath;
70 - (NSArray *)soundSetArray;
71 - (NSDictionary *)soundsDictionaryFromDictionary:(NSDictionary *)infoDict usingLocation:(NSString **)outSoundLocation;
72 - (void)speakText:(NSString *)text;
73 - (void)speakText:(NSString *)text withVoice:(NSString *)voiceString pitch:(float)pitch rate:(float)rate;
75 - (NSArray *)voices;
76 - (void)speakDemoTextForVoice:(NSString *)voiceString withPitch:(float)pitch andRate:(float)rate;
78 - (float)defaultRate;
79 - (float)defaultPitch;
81 //Private
82 - (void)initController;
83 - (void)closeController;
85 @end