gpt4 book ai didi

ios5 - iOS AUGraph在混音器和kAudioUnitSubType_RemoteIO之间连接kAudioUnitSubType_Reverb2单元

转载 作者:行者123 更新时间:2023-12-03 00:10:26 25 4
gpt4 key购买 nike

在我的AuGraph中,我有以下情况:

采样器--------->

                mixer ----> remoteIO

6个回调----->
AudioUnitGraph 0x311E02A:   
Member Nodes:
node 1: 'auou' 'rioc' 'appl', instance 0xc66c020 O
node 2: 'aumx' 'mcmx' 'appl', instance 0x598f20 O
node 3: 'aumu' 'samp' 'appl', instance 0x59ba40 O
Connections: node 3 bus 0 => node 2 bus 7 [ 2 ch, 44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved]
node 2 bus 0 => node 1 bus 0 [ 2 ch, 0 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
Input Callbacks: {0x1a7bb1, 0xd1f5648} => node 2 bus 0 [1 ch, 44100 Hz]
{0x1a7bb1, 0xd1f5648} => node 2 bus 1 [1 ch, 44100 Hz] {0x1a7bb1, 0xd1f5648} => node 2 bus 2 [1 ch, 44100 Hz]
{0x1a7bb1, 0xd1f5648} => node 2 bus 3 [1 ch, 44100 Hz]
{0x1a7bb1, 0xd1f5648} => node 2 bus 4 [1 ch, 44100 Hz]
{0x1a7bb1, 0xd1f5648} => node 2 bus 5 [1 ch, 44100 Hz]
{0x1a7bb1, 0xd1f5648} => node 2 bus 6 [1 ch, 44100 Hz]

一切正常,但是格式不匹配。回调工作和采样器
听起来像是一种魅力。

现在,我尝试插入混响,如下所示:

sampl->

调音台----> 混响-> remoteIO

6个电话->

我得到这张图:
AudioUnitGraph 0x313402A:
Member Nodes:
node 1: 'auou' 'rioc' 'appl', instance 0x569060 O
node 2: 'aumx' 'mcmx' 'appl', instance 0x56a210 O
node 3: 'aumu' 'samp' 'appl', instance 0x56b200 O
node 4: 'aufx' 'rvb2' 'appl', instance 0x56ba30 O
Connections:
node 3 bus 0 => node 2 bus 7 [ 2 ch, 44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved]
node 2 bus 0 => node 4 bus 0 [ 2 ch, 44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
node 4 bus 0 => node 1 bus 0 [ 2 ch, 0 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]

Input Callbacks: (the same as before)

错误: AUGraph初始化错误:-10868 *

连接代码:
result = AUGraphConnectNodeInput ( processingGraph,
mixerNode, // source node
0, // source node output bus number
revNode, // destination node
0 // desintation node input bus number
);


result = AUGraphConnectNodeInput ( processingGraph,
revNode, // source node
0, // source node output bus number
iONode, // destination node
0 // desintation node input bus number );

我也尝试统一混响和混音器的格式:
AudioStreamBasicDescription asbd;
UInt32 asbdSize = sizeof (asbd);
memset (&asbd, 0, sizeof (asbd));

AudioUnitGetProperty(mixerUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &asbd, &asbdSize);
AudioUnitSetProperty(reverbUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 0, &asbd, sizeof(asbd));

我究竟做错了什么?
对不起,格式不好,今天加入。

最佳答案

我遇到了同样的问题,但是发现我必须从调音台输入的一个单元中复制ASBD,并将其设置为调音台单元的输出范围。

AudioStreamBasicDescription asbd;
UInt32 sz = sizeof(asbd);
result = AudioUnitGetProperty(someUnitBeforeMixer, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 0, &asbd, &sz);
NSCAssert (result == noErr, @"Unable to get ASBD. Error code: %d '%.4s'", (int) result, (const char *)&result);
result = AudioUnitSetProperty(mixerUnit,
kAudioUnitProperty_StreamFormat,
kAudioUnitScope_Output,
0,
&asbd,
sizeof(asbd));
NSCAssert (result == noErr, @"Unable to set ASBD. Error code: %d '%.4s'", (int) result, (const char *)&result);

如果不知道应采用哪种格式,则可以手动设置它,而不用复制ASBD。

关于ios5 - iOS AUGraph在混音器和kAudioUnitSubType_RemoteIO之间连接kAudioUnitSubType_Reverb2单元,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12205005/

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