// // XHAudioPlayerHelper.h // MessageDisplayKit // // Created by Aevitx on 14-1-22. // Copyright (c) 2014年 Aevitx. All rights reserved. // #import #import #import #import "XHMacro.h" @protocol XHAudioPlayerHelperDelegate @optional - (void)didAudioPlayerBeginPlay:(AVAudioPlayer*)audioPlayer; - (void)didAudioPlayerStopPlay:(AVAudioPlayer*)audioPlayer; - (void)didAudioPlayerPausePlay:(AVAudioPlayer*)audioPlayer; @end @interface XHAudioPlayerHelper : NSObject @property (nonatomic, strong) AVAudioPlayer *player; @property (nonatomic, copy) NSString *playingFileName; @property (nonatomic, assign) id delegate; @property (nonatomic, strong) NSIndexPath *playingIndexPathInFeedList;//给动态列表用 + (id)shareInstance; - (BOOL)isPlaying; - (void)managerAudioWithFileName:(NSString*)amrName toPlay:(BOOL)toPlay; - (void)pausePlayingAudio;//暂停 - (void)stopAudio;//停止 @end