SPSoundChannel+Additions.h:
#import "SPSoundChannel.h"
@class AVAudioPlayer;
@interface SPSoundChannel (Additions)
@property (nonatomic, readonly) AVAudioPlayer *player;
@end
SPSoundChannel+Additions.m:
#import "SPSoundChannel+Additions.h"
#import "SPAVSoundChannel.h"
#import "SPALSoundChannel.h"
@implementation SPAVSoundChannel (Additions)
- (AVAudioPlayer *)player
{
return [self valueForKey:@"_player"];
}
@end
@implementation SPSoundChannel (Additions)
- (AVAudioPlayer *)player
{
return nil;
}
@end
@implementation SPALSoundChannel (Additions)
- (AVAudioPlayer *)player
{
return nil;
}
@end
Or you can do something like this...
SPSoundChannel+Additions.m:
#import "SPSoundChannel+Additions.h"
#import "SPAVSoundChannel.h"
#import "SPALSoundChannel.h"
@interface SPAVSoundChannel ()
{
AVAudioPlayer *_player;
}
@end
@implementation SPAVSoundChannel (Additions)
- (AVAudioPlayer *)player
{
return _player;
}
@end
@implementation SPSoundChannel (Additions)
- (AVAudioPlayer *)player
{
return nil;
}
@end
@implementation SPALSoundChannel (Additions)
- (AVAudioPlayer *)player
{
return nil;
}
@end
This is just an example, you would need to create a currentTime property instead of a player property.