【问题标题】:Using iOS Reverb effect使用 iOS 混响效果
【发布时间】:2013-04-16 19:15:08
【问题描述】:

kAudioUnitSubType_Reverb2 效果在我的音频单元图中不起作用。当我从图中排除它的节点时,一切正常。我尝试在前一个节点和混响节点之间以及混响之后添加转换器。我确实将转换器节点输入的流格式设置为前一个节点输出的格式,并将转换器的输出设置为混响输入。初始化音频图时,我只是收到错误-10868。 如何让它发挥作用?

这是我的图表:

AudioUnitGraph 0x186000:
  Member Nodes:
    node 1: 'aufc' 'conv' 'appl', instance 0x1b3a60 O  
    node 2: 'aufc' 'conv' 'appl', instance 0x1b3710 O  
    node 3: 'auou' 'rioc' 'appl', instance 0x1b3b80 O  
    node 4: 'aumx' 'mcmx' 'appl', instance 0x1b5220 O  
    node 5: 'aufx' 'rvb2' 'appl', instance 0x1b6790 O  
  Connections:
    node   4 bus   0 => node   1 bus   0  [ 2 ch,  44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
    node   1 bus   0 => node   5 bus   0  [ 2 ch,  44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
    node   5 bus   0 => node   2 bus   0  [ 2 ch,  44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved]
    node   2 bus   0 => node   3 bus   0  [ 2 ch,  44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved]
  Input Callbacks:
    {0x1b77d, 0x1b2d10} => node   4 bus   0  [2 ch, 44100 Hz]
    {0x1b77d, 0x1b2d10} => node   4 bus   1  [2 ch, 44100 Hz]
  CurrentState:
    mLastUpdateError=0, eventsToProcess=F, isRunning=F

【问题讨论】:

    标签: ios core-audio effects audiounit


    【解决方案1】:

    Varispeed 节点也有类似的问题。我有几个变速节点连接到多混音器的几条总线。此多混音器节点已连接到 RemoteIO 节点。并且没有播放声音。但后来我在 multimixer 和 remoteIO 之间添加了转换器节点(AUConverter)并设置流格式属性:

    result = AudioUnitSetProperty (convertUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 0, &stereoStreamFormat, sizeof (stereoStreamFormat));
    

    stereoStreamFormat - 此格式在我的应用中用于所有多混音器总线。

    所以我相信问题出在这种格式上:

    node   2 bus   0 => node   3 bus   0  [ 2 ch,  44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved]
    

    如果您添加转换器节点并设置它的立体声格式,您应该会看到:

    node   2 bus   0 => node   3 bus   0  [ 2 ch,  44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
    

    【讨论】:

    • 谢谢!其实我的问题解决得比较简单:我没有设置mixer的输出格式。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多