2 * Adium is the legal property of its developers, whose names are listed in the copyright file included
3 * with this source distribution.
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.
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.
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"
34 SOUND_SYTEM_OUTPUT_DEVICE
= 0,
35 SOUND_SYTEM_ALERT_DEVICE
38 @interface AISoundController
: NSObject
{
39 IBOutlet AIAdium
*adium
;
41 NSMutableDictionary
*soundCacheDict
;
42 NSMutableArray
*soundCacheArray
;
43 NSTimer
*soundCacheCleanupTimer
;
47 SoundDeviceType soundDeviceType
;
50 int activeSoundThreads
;
51 BOOL soundThreadActive
;
55 NSMutableDictionary
*systemSoundIDDict
;
57 NSMutableArray
*speechArray
;
63 SUSpeaker
*speaker_variableVoice
;
64 SUSpeaker
*speaker_defaultVoice
;
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
;
76 - (void)speakDemoTextForVoice
:(NSString
*)voiceString withPitch
:(float)pitch andRate
:(float)rate
;
79 - (float)defaultPitch
;
82 - (void)initController
;
83 - (void)closeController
;