closed #4590, remove -> property access

This commit is contained in:
andyque 2014-03-28 16:41:33 +08:00
parent 97883acfb1
commit 5a9af407dc
2 changed files with 18 additions and 18 deletions

View File

@ -95,9 +95,9 @@ NSString * const kCDN_AudioManagerInitialised = @"kCDN_AudioManagerInitialised";
-(void) play { -(void) play {
if (enabled_) { if (enabled_) {
self->systemPaused = NO; systemPaused = NO;
self->paused = NO; paused = NO;
self->stopped = NO; stopped = NO;
[audioSourcePlayer play]; [audioSourcePlayer play];
} else { } else {
CDLOGINFO(@"Denshion::CDLongAudioSource long audio source didn't play because it is disabled"); 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 { -(void) stop {
self->paused = NO; paused = NO;
self->stopped = YES; stopped = YES;
[audioSourcePlayer stop]; [audioSourcePlayer stop];
} }
-(void) pause { -(void) pause {
self->paused = YES; paused = YES;
[audioSourcePlayer pause]; [audioSourcePlayer pause];
} }
-(void) rewind { -(void) rewind {
self->paused = NO; paused = NO;
[audioSourcePlayer setCurrentTime:0]; [audioSourcePlayer setCurrentTime:0];
[audioSourcePlayer play]; [audioSourcePlayer play];
stopped = NO; stopped = NO;
@ -124,7 +124,7 @@ NSString * const kCDN_AudioManagerInitialised = @"kCDN_AudioManagerInitialised";
-(void) resume { -(void) resume {
if (!stopped) { if (!stopped) {
self->paused = NO; paused = NO;
[audioSourcePlayer play]; [audioSourcePlayer play];
} }
} }
@ -625,7 +625,7 @@ static BOOL configured = FALSE;
} }
- (void) applicationWillResignActive { - (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 //Set the audio sesssion to one that allows sharing so that other audio won't be clobbered on resume
[self audioSessionSetCategory:AVAudioSessionCategoryAmbient]; [self audioSessionSetCategory:AVAudioSessionCategoryAmbient];
@ -670,7 +670,7 @@ static BOOL configured = FALSE;
- (void) applicationDidBecomeActive { - (void) applicationDidBecomeActive {
if (self->_resigned) { if (_resigned) {
_resigned = NO; _resigned = NO;
//Reset the mode incase something changed with audio while we were inactive //Reset the mode incase something changed with audio while we were inactive
[self setMode:_mode]; [self setMode:_mode];

View File

@ -94,8 +94,8 @@ NSString * const kCDN_AudioManagerInitialised = @"kCDN_AudioManagerInitialised";
-(void) play { -(void) play {
if (enabled_) { if (enabled_) {
self->systemPaused = NO; systemPaused = NO;
self->paused = NO; paused = NO;
[audioSourcePlayer play]; [audioSourcePlayer play];
} else { } else {
CDLOGINFO(@"Denshion::CDLongAudioSource long audio source didn't play because it is disabled"); 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 { -(void) stop {
self->paused = NO; paused = NO;
[audioSourcePlayer stop]; [audioSourcePlayer stop];
} }
-(void) pause { -(void) pause {
self->paused = YES; paused = YES;
[audioSourcePlayer pause]; [audioSourcePlayer pause];
} }
-(void) rewind { -(void) rewind {
self->paused = NO; paused = NO;
[audioSourcePlayer setCurrentTime:0]; [audioSourcePlayer setCurrentTime:0];
[audioSourcePlayer play]; [audioSourcePlayer play];
} }
-(void) resume { -(void) resume {
self->paused = NO; paused = NO;
[audioSourcePlayer resume]; [audioSourcePlayer resume];
} }
@ -619,7 +619,7 @@ static BOOL configured = FALSE;
} }
- (void) applicationWillResignActive { - (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 //Set the audio sesssion to one that allows sharing so that other audio won't be clobbered on resume
[self audioSessionSetCategory:AVAudioSessionCategoryAmbient]; [self audioSessionSetCategory:AVAudioSessionCategoryAmbient];
@ -664,7 +664,7 @@ static BOOL configured = FALSE;
- (void) applicationDidBecomeActive { - (void) applicationDidBecomeActive {
if (self->_resigned) { if (_resigned) {
_resigned = NO; _resigned = NO;
//Reset the mode incase something changed with audio while we were inactive //Reset the mode incase something changed with audio while we were inactive
[self setMode:_mode]; [self setMode:_mode];