0

Hi everyone, I've made a patch with pure data to load and play samples that will then be loaded into xcode with libpd. This all works fine but when I run the xcode project I only get sound from the right channel of my headphones.

I'll attach a picture to show my patch, and you can see that the dac has a cable on each inlet, which is why I don't understand how it isn't playing the sound in both channels.

Please note I've only attached it to the top left sample for testing purposes.

Thanks in advance!

http://i46.tinypic.com/3531gmb.png

@andyvn22: is this what you are after? Sorry I'm new to XCode so I'm not too sure!

-(void)viewDidLoad {
[super viewDidLoad];
dispatcher = [[PdDispatcher alloc] init];
[PdBase setDelegate:dispatcher];
patch = [PdBase openFile:@"Patch.pd"
                    path:[[NSBundle mainBundle] resourcePath]];
if (!patch) {
    NSLog(@"Failed to open patch!");
}
}



-(void)viewDidUnload {
    [super viewDidUnload];
    [PdBase closeFile:patch];
    [PdBase setDelegate:nil];
}
// Omitting the remaining view controller methods...

#pragma mark - button callbacks



-(IBAction)playc1:(id)sender {
    [PdBase sendBangToReceiver: @"c1"];
user1892540
  • 211
  • 1
  • 4
  • 8

1 Answers1

0

Try using PdAudioController's -configurePlaybackWithSampleRate:numberChannels:inputEnabled: method to set the channels to 2.

andyvn22
  • 14,696
  • 1
  • 52
  • 74
  • Apologies, I already had the code below in my AppDelegate.m file, if I try using the method you suggested I get this error: No visible @interface for 'PdAudioController' declares the selector 'configurePlaybackWithSampleRate:numberChannels:mixingEnabled:' =============================================================== _audioController = [[PdAudioController alloc] init]; if ([self.audioController configureAmbientWithSampleRate:44100 numberChannels:2 mixingEnabled:YES] != PdAudioOK) { – user1892540 Jan 30 '13 at 02:35