//
//  NewAudioPlay.h
//  X-BASIC for iOS
//
//  Created by AIG-Soft(iMac) on 2015/10/09.
//  Copyright © 2015年 AIG-Soft. All rights reserved.
//
// iOS8以降のみ

#import <AVFoundation/AVFoundation.h>

@interface NewAudioPlay : NSObject
{
}
@property (nonatomic) float volume;
@property (nonatomic) float panpot;
@property (nonatomic) float reverb;
// delay用は存在するが機能しない
@property (nonatomic) NSTimeInterval delayTime;
@property (nonatomic) float feedback;
@property (nonatomic) float wetDryMix;
@property (nonatomic) float lowPassCutoff;

- (instancetype)init;
- (BOOL)readFileToBuffer;
- (BOOL)setFile:(NSString *)fname;
- (void)setFormatWav:(double)rate;
- (BOOL)connectAndStart;
- (BOOL)scheduleBuffer:(AVAudioPlayerNodeBufferOptions)option;
- (BOOL)scheduleFile;
- (void)play;
- (void)playAtTime:(AVAudioTime * _Nullable)when;
- (void)pause;
- (void)stop;
- (void)setReverb:(float)reverb preset:(AVAudioUnitReverbPreset)preset;
- (BOOL)playing;

@end