Re: still super duper frustrated about the au graph..
Re: still super duper frustrated about the au graph..
- Subject: Re: still super duper frustrated about the au graph..
- From: email@hidden
- Date: Sat, 21 Mar 2015 13:27:37 +0900
Patrick
This might not help tremendously, but here goes.
You're not dumb and it is hard.
These APIs and similar things for any platform are not easy.
They require strong C and or C++ as well as technical knowledge of the formats involved.
You should really look at the Core Audio book that's out there. It's going to help a lot.
Learn it in chunks. Build what you need to learn in the smallest simplest parts possible then start to piece it together.
Study the example code with the book and on apple's sit and on the web.
But really consider AVAudioEngine if you can.
It really isn't well documented but it does make things a lot easier.
Futzing about with buffers in real time and with endianness and formats is hard.
Sent from my iPhone
> On 2015/03/21, at 12:55, Patrick J. Collins <email@hidden> wrote:
>
> 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@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden