문제

I have a an AUGraph made of entirely of Apple AudioUnits - DLSSynth, Delay, Stereo Mixer. I am trying to capture the output of this into an ExtAudioFile. My issue is that I think I need to convert from the AudioUnit format to a file format that ExtAudioFile can use. If I take the ASBD from the AUGraph, I get

mSampleRate Float64 44100
mFormatID   UInt32  1819304813
mFormatFlags    UInt32  41  
mBytesPerPacket UInt32  4   
mFramesPerPacket    UInt32  1   
mBytesPerFrame  UInt32  4   
mChannelsPerFrame   UInt32  2   
mBitsPerChannel UInt32  32  
mReserved   UInt32  0   

But I can't create create an ExtAudioFile with that ASBD without getting a fmt? error. Can someone point in the right direction for recording this stream to a file?

도움이 되었습니까?

해결책

You want to use that ASBD as your ExtAudioFile's client format (kExtAudioFileProperty_ClientDataFormat), set via property after file creation. This is the format of the data you pass in ExtAudioFileWrite. The format of the output file is specified in ExtAudioFileOpen.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top