NoisePlayerManager.h 875 字节
//
//  NoisePlayerManager.h
//  DreamSleep
//
//  Created by peter on 2022/5/15.
//

#import <Foundation/Foundation.h>
#import "NoisePlayItem.h"
#import <KTVHTTPCache/KTVHTTPCache.h>

NS_ASSUME_NONNULL_BEGIN

/// 白噪音音频播放管理器
@interface NoisePlayerManager : NSObject
SingletonH(NoisePlayerManager)

/// 播放列表,存放NoisePlayItem对象(数据共享)
@property (nonatomic, strong, readonly) NSArray<NoisePlayItem *> *playItemList;

/// 播放状态(所有播放列表中只要有1个在播放则为YES,全部暂停为NO)
@property (nonatomic, assign) BOOL isPlaying;

/// 一键播放
- (void)playAll;
/// 一键暂停
- (void)pauseAll;
/// 一键停止
- (void)stopAll;

- (void)addNoisePlayItem:(NoisePlayItem *)item;
- (void)removeNoisePlayItemWithAudioID:(int)noise_audio_id;
- (void)removeAllNoisePlayItem;
@end

NS_ASSUME_NONNULL_END