From 5a9af407dc207136d301ee0a10d1db42919d616e Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 28 Mar 2014 16:41:33 +0800 Subject: [PATCH] closed #4590, remove -> property access --- cocos/audio/ios/CDAudioManager.m | 20 ++++++++++---------- cocos/audio/mac/CDAudioManager.m | 16 ++++++++-------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cocos/audio/ios/CDAudioManager.m b/cocos/audio/ios/CDAudioManager.m index 56a6fb1be5..cc2d75c71e 100644 --- a/cocos/audio/ios/CDAudioManager.m +++ b/cocos/audio/ios/CDAudioManager.m @@ -95,9 +95,9 @@ NSString * const kCDN_AudioManagerInitialised = @"kCDN_AudioManagerInitialised"; -(void) play { if (enabled_) { - self->systemPaused = NO; - self->paused = NO; - self->stopped = NO; + systemPaused = NO; + paused = NO; + stopped = NO; [audioSourcePlayer play]; } else { CDLOGINFO(@"Denshion::CDLongAudioSource long audio source didn't play because it is disabled"); @@ -105,18 +105,18 @@ NSString * const kCDN_AudioManagerInitialised = @"kCDN_AudioManagerInitialised"; } -(void) stop { - self->paused = NO; - self->stopped = YES; + paused = NO; + stopped = YES; [audioSourcePlayer stop]; } -(void) pause { - self->paused = YES; + paused = YES; [audioSourcePlayer pause]; } -(void) rewind { - self->paused = NO; + paused = NO; [audioSourcePlayer setCurrentTime:0]; [audioSourcePlayer play]; stopped = NO; @@ -124,7 +124,7 @@ NSString * const kCDN_AudioManagerInitialised = @"kCDN_AudioManagerInitialised"; -(void) resume { if (!stopped) { - self->paused = NO; + paused = NO; [audioSourcePlayer play]; } } @@ -625,7 +625,7 @@ static BOOL configured = FALSE; } - (void) applicationWillResignActive { - self->_resigned = YES; + _resigned = YES; //Set the audio sesssion to one that allows sharing so that other audio won't be clobbered on resume [self audioSessionSetCategory:AVAudioSessionCategoryAmbient]; @@ -670,7 +670,7 @@ static BOOL configured = FALSE; - (void) applicationDidBecomeActive { - if (self->_resigned) { + if (_resigned) { _resigned = NO; //Reset the mode incase something changed with audio while we were inactive [self setMode:_mode]; diff --git a/cocos/audio/mac/CDAudioManager.m b/cocos/audio/mac/CDAudioManager.m index 93a074fbf9..b5365af68c 100644 --- a/cocos/audio/mac/CDAudioManager.m +++ b/cocos/audio/mac/CDAudioManager.m @@ -94,8 +94,8 @@ NSString * const kCDN_AudioManagerInitialised = @"kCDN_AudioManagerInitialised"; -(void) play { if (enabled_) { - self->systemPaused = NO; - self->paused = NO; + systemPaused = NO; + paused = NO; [audioSourcePlayer play]; } else { CDLOGINFO(@"Denshion::CDLongAudioSource long audio source didn't play because it is disabled"); @@ -103,23 +103,23 @@ NSString * const kCDN_AudioManagerInitialised = @"kCDN_AudioManagerInitialised"; } -(void) stop { - self->paused = NO; + paused = NO; [audioSourcePlayer stop]; } -(void) pause { - self->paused = YES; + paused = YES; [audioSourcePlayer pause]; } -(void) rewind { - self->paused = NO; + paused = NO; [audioSourcePlayer setCurrentTime:0]; [audioSourcePlayer play]; } -(void) resume { - self->paused = NO; + paused = NO; [audioSourcePlayer resume]; } @@ -619,7 +619,7 @@ static BOOL configured = FALSE; } - (void) applicationWillResignActive { - self->_resigned = YES; + _resigned = YES; //Set the audio sesssion to one that allows sharing so that other audio won't be clobbered on resume [self audioSessionSetCategory:AVAudioSessionCategoryAmbient]; @@ -664,7 +664,7 @@ static BOOL configured = FALSE; - (void) applicationDidBecomeActive { - if (self->_resigned) { + if (_resigned) { _resigned = NO; //Reset the mode incase something changed with audio while we were inactive [self setMode:_mode];