大家好,我用纯数据做了一个补丁来加载和播放样本,然后用libpd加载到xcode中。这一切都很好,但当我运行xcode项目时,我只能从耳机的正确声道获得声音。
我会附上一张图片来显示我的补丁,你可以看到dac在每个接口上都有一根电缆,这就是为什么我不明白它为什么不能在两个通道中播放声音。
请注意,我只是出于测试目的将其附加到左上角的示例中。
提前感谢!
http://i46.tinypic.com/3531gmb.png
@andyvn22:这就是你想要的吗?对不起,我是XCode的新手,所以我不太确定!
-(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"];发布于 2013-01-30 10:30:04
尝试使用PdAudioController的-configurePlaybackWithSampleRate:numberChannels:inputEnabled:方法将通道设置为2。
https://stackoverflow.com/questions/14595543
复制相似问题