Hi everyone, So a week or so has gone by, and I feel like I am getting nowhere (or at least close to nowhere) with my goal of being able to simply to:
input buffer -> low pass -> new buffer Can anyone please please please help me? I have read pretty much all of Apple's documentation on this subject and I just do not understand so many things... At first I was trying to just use the default output so that I could at least hear the low pass happening.. Unfortunately all I hear is garbage... I figured it's because the asbd is wrong-- so I tried setting the asbd on the lowpass unit, and I get "-10868" when trying to set the stream format on the low pass unit's input scope or output scope... Then I tried to set the asbd on the output unit, and then I get error -50, which says a parameter is wrong-- but.. the parameters are not wrong! AudioStreamBasicDescription asbd; asbd.mSampleRate = 8000; asbd.mFormatID = kAudioFormatLinearPCM; asbd.mFormatFlags = kAudioFormatFlagIsSignedInteger; asbd.mFramesPerPacket = 1; asbd.mChannelsPerFrame = 1; asbd.mBitsPerChannel = 16; asbd.mBytesPerPacket = 2; asbd.mBytesPerFrame = 2; There should be absolutely nothing wrong with those parameters, so I don't understand why it's giving a -50 error... Regardless, I ultimately don't want to output to the hardward, I want to do a quick offline render to lowpass filter my buffer... So, I change my output description from kAudioUnitSubType_DefaultOutput to kAudioUnitSubType_GenericOytput And then suddenly my lowpass input render proc is not getting called-- which I assume is because I need to call AudioUnitRender... However, I cannot find any documentation or examples anywhere about how to correctly do this! Where do you call AudioUnitRender? I assume this needs to be in a loop, but-- clearly I don't want to manually call this in a loop myself... I tried adding a InputProc callback to my generic output unit, but it doesn't get called either. Here is my code: https://gist.github.com/patrick99e99/9221d8d7165d610fd3e1 I keep asking myself: Why is this so difficult?? Why is there so little information out on the internet about how to do this?? All I can find are a bunch of people asking some-what similar questions on stackoverflow that aren't similar enough to help answer my questions. Core audio has been around for a long time, and there are tons of apps doing this sort of thing, so I am just really surprised by the lack of information and available help for what seems like should be a simple thing to do.... How about if I try this: HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Thank you! Patrick J. Collins http://collinatorstudios.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com This email sent to [email protected]
