gpt4 book ai didi

xcode - libPd XCode 声音问题

转载 作者:行者123 更新时间:2023-12-03 02:20:06 25 4
gpt4 key购买 nike

大家好,
我用纯数据制作了一个补丁来加载和播放样本,然后使用 libpd 将这些样本加载到 xcode 中。这一切都很好,但是当我运行 xcode 项目时,我只能从耳机的右声道获得声音。

我会附上一张图片来展示我的补丁,你可以看到 dac 在每个入口都有一根电缆,这就是为什么我不明白它为什么不能在两个 channel 中播放声音。

请注意,出于测试目的,我仅将其附加到左上角的示例中。

提前致谢!

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"];

最佳答案

尝试使用 PdAudioController-configurePlaybackWithSampleRate:numberChannels:inputEnabled:方法将 channel 设置为 2。

关于xcode - libPd XCode 声音问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14595543/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com