
#import "RNPureDataModule.h"

@implementation RNPureDataModule

- (dispatch_queue_t)methodQueue
{
    return dispatch_get_main_queue();
}
RCT_EXPORT_MODULE()

RCT_EXPORT_METHOD(initPdWithFile) {
    NSLog(@"initiating Pd with file");
    NSLog(@"let's do this");
    // Pure Data initiation
    self.pd = [[PdAudioController alloc]init];
    NSLog(self.pd);
    PdAudioStatus pdInit = [self.pd configureAmbientWithSampleRate:44100 numberChannels:2 mixingEnabled:YES];
    if(pdInit != PdAudioOK){
        NSLog(@"pd failed to initialize");
    }
    NSLog(@"I guess there's no error??");
}

@end
