Ignore:
Timestamp:
02/23/03 04:55:07 (20 years ago)
Author:
Nicholas Riley
Message:

Pester 1.1b3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/Pester/Source/PSSpeechAlert.m

    r53 r102  
    5555    alarm = anAlarm;
    5656    [speaker setDelegate: self];
    57     [speaker setVoice: [[SUSpeaker voiceNames] indexOfObject: voice] + 1];
     57    unsigned voiceIndex = [[SUSpeaker voiceNames] indexOfObject: voice];
     58    if (voiceIndex == NSNotFound)
     59        voiceIndex = [[SUSpeaker voiceNames] indexOfObject: [SUSpeaker defaultVoice]];
     60    [speaker setVoice: voiceIndex + 1];
    5861    [speaker speakText: [alarm message]];
    5962}
     
    7881{
    7982    if ( (self = [self init]) != nil) {
    80         voice = [dict objectForRequiredKey: PLAlertVoice];
     83        voice = [[dict objectForRequiredKey: PLAlertVoice] retain];
    8184    }
    8285    return self;
Note: See TracChangeset for help on using the changeset viewer.