project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.m
changeset 6908 896ed2afcfb8
parent 6659 a6030b32b222
child 8441 a00b0fa0dbd7
equal deleted inserted replaced
6907:a2f9a9a62dc5 6908:896ed2afcfb8
    46 }
    46 }
    47 
    47 
    48 #pragma mark -
    48 #pragma mark -
    49 #pragma mark NSOperation
    49 #pragma mark NSOperation
    50 -(id) initFadeWithAudioPlayer:(AVAudioPlayer*)player toVolume:(float)volume overDuration:(NSTimeInterval)duration withDelay:(NSTimeInterval)timeDelay {
    50 -(id) initFadeWithAudioPlayer:(AVAudioPlayer*)player toVolume:(float)volume overDuration:(NSTimeInterval)duration withDelay:(NSTimeInterval)timeDelay {
    51   if (self = [super init]) {
    51   if ((self = [super init])) {
    52     self.audioPlayer = player;
    52     self.audioPlayer = player;
    53     [player prepareToPlay];
    53     [player prepareToPlay];
    54     _fadeDuration = duration;
    54     _fadeDuration = duration;
    55     _finishVolume = volume;
    55     _finishVolume = volume;
    56     _playBeforeFade = YES;
    56     _playBeforeFade = YES;