You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.0 KiB
46 lines
1.0 KiB
// |
|
// XHAudioPlayerHelper.h |
|
// MessageDisplayKit |
|
// |
|
// Created by Aevitx on 14-1-22. |
|
// Copyright (c) 2014年 Aevitx. All rights reserved. |
|
// |
|
|
|
#import <Foundation/Foundation.h> |
|
#import <AVFoundation/AVFoundation.h> |
|
|
|
#import "XHMacro.h" |
|
|
|
@protocol XHAudioPlayerHelperDelegate <NSObject> |
|
|
|
@optional |
|
- (void)didAudioPlayerBeginPlay:(AVAudioPlayer*)audioPlayer; |
|
- (void)didAudioPlayerStopPlay:(AVAudioPlayer*)audioPlayer; |
|
- (void)didAudioPlayerPausePlay:(AVAudioPlayer*)audioPlayer; |
|
|
|
@end |
|
|
|
@interface XHAudioPlayerHelper : NSObject <AVAudioPlayerDelegate> |
|
|
|
@property (nonatomic, strong) AVAudioPlayer *player; |
|
|
|
@property (nonatomic, copy) NSString *playingFileName; |
|
|
|
@property (nonatomic, assign) id <XHAudioPlayerHelperDelegate> delegate; |
|
|
|
@property (nonatomic, strong) NSIndexPath *playingIndexPathInFeedList;//给动态列表用 |
|
|
|
+ (id)shareInstance; |
|
|
|
- (AVAudioPlayer*)player; |
|
- (BOOL)isPlaying; |
|
|
|
- (void)managerAudioWithFileName:(NSString*)amrName toPlay:(BOOL)toPlay; |
|
- (void)pausePlayingAudio;//暂停 |
|
- (void)stopAudio;//停止 |
|
|
|
|
|
|
|
@end |
|
|
|
|
|
|