AUGraph variSpeed didn't accept StreamFormat on iOS 5.x

1

I have a AUGraph to Play and Record Audio with this Setup:

RemoteIO      ->                                 -> RemoteIO
                  Mulichannel Mixer -> variSpeed 
Read Callback ->                                 -> Write Callback

My Problem is that the kAudioUnitSubType_Varispeed didn't accept the StreamFormat on iOS 5.x. On iOS 6 is works. Without the correct StreamFormat the AUGraph didn't run.

I set the same StreamFormat on all In- and Outputs:

    memset(&_audioFormat, 0, sizeof(_audioFormat));
UInt32 propertySize = sizeof(AudioStreamBasicDescription);
CheckError(AudioUnitGetProperty(self.io, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &_audioFormat, &propertySize), "Couldn't get audio Format for io input");
_audioFormat.mChannelsPerFrame  = 1;
_audioFormat.mSampleRate = self.hardwareSampleRate;

// set audio Format for io
CheckError(AudioUnitSetProperty(self.io, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, kInputBus, &_audioFormat, sizeof(_audioFormat)), "Couldn't set audio Format for output");
CheckError(AudioUnitSetProperty(self.io, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, kOutputBus, &_audioFormat, sizeof(_audioFormat)), "Couldn't set audio Format for input");

// set audio Format for mixer
CheckError(AudioUnitSetProperty(self.mixer, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &_audioFormat, sizeof(_audioFormat)), "Couldn't set audio Format for mixer 0");
CheckError(AudioUnitSetProperty(self.mixer, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 1, &_audioFormat, sizeof(_audioFormat)), "Couldn't set audio Format for mixer 1");
CheckError(AudioUnitSetProperty(self.mixer, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, kOutputBus, &_audioFormat, sizeof(_audioFormat)), "Couldn't set audio Format for mixer output");

// set audio Format for speed
CheckError(AudioUnitSetProperty(self.speed, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &_audioFormat, sizeof(_audioFormat)), "Couldn't set audio Format for speed input");
CheckError(AudioUnitSetProperty(self.speed, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 0, &_audioFormat, sizeof(_audioFormat)), "Couldn't set audio Format for speed output");

CAShow on iOS 5.x:

    AudioUnitGraph 0x6CC000:
  Member Nodes:
    node 1: 'auou' 'rioc' 'appl', instance 0x18cc2a0 O I
    node 2: 'aumx' 'mcmx' 'appl', instance 0x455680 O I
    node 3: 'aufc' 'vari' 'appl', instance 0x450270 O I
  Connections:
    node   1 bus   1 => node   2 bus   1  [ 1 ch,  22000 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
    node   2 bus   0 => node   3 bus   0  [ 2 ch,  44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
    node   3 bus   0 => node   1 bus   0  [ 1 ch,  22000 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
  Input Callbacks:
    {0x53b5d, 0x454cd0} => node   2 bus   0  [1 ch, 22000 Hz]
  CurrentState:
    mLastUpdateError=0, eventsToProcess=F, isRunning=F

CAShow on iOS 6.x:

    AudioUnitGraph 0x388000:
  Member Nodes:
    node 1: 'auou' 'rioc' 'appl', instance 0x1f03b1e0 O I
    node 2: 'aumx' 'mcmx' 'appl', instance 0x1f05fd60 O I
    node 3: 'aufc' 'vari' 'appl', instance 0x1e590b90 O I
  Connections:
    node   1 bus   1 => node   2 bus   1  [ 1 ch,  22000 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
    node   2 bus   0 => node   3 bus   0  [ 1 ch,  22000 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
    node   3 bus   0 => node   1 bus   0  [ 1 ch,  22000 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
  Input Callbacks:
    {0xe9b5d, 0x1e58e4e0} => node   2 bus   0  [1 ch, 22000 Hz]
  CurrentState:
    mLastUpdateError=0, eventsToProcess=F, isRunning=F

Why does the speed Node didn't accept the StreamFormat on iOS 5.x :( ? Is there anyone out there who can help me? Thanks.

iphone
ios
objective-c
audio
core-audio
asked on Stack Overflow Jan 18, 2013 by Werewolve

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0