Re: How to go about debugging transient "statics" using AudioUnit's RemoteIO
Re: How to go about debugging transient "statics" using AudioUnit's RemoteIO
- Subject: Re: How to go about debugging transient "statics" using AudioUnit's RemoteIO
- From: Aran Mulholland <email@hidden>
- Date: Mon, 16 Jan 2012 09:10:54 +1100
I don't know if this is any help but you don't have to run tests in
the simulator. You can create logic tests that have audio
capabilities. Then the simulator is out of the equation.
Are you cleaning up all your objects when the test finishes? I have
found that in some cases when I started other threads the end of an
individual test would not kill the threads then they were still
running at the same time as the next test.
On Mon, Jan 16, 2012 at 5:17 AM, Gregory Wieber <email@hidden> wrote:
> You're going to run into trouble if you try to put NSLog or printf
> statements in your callback.
>
> Have you checked to make sure you're not getting NaN values at any point in
> your calculations?
>
>
>
> On Sun, Jan 15, 2012 at 2:06 AM, Jean-François Brouillet <email@hidden>
> wrote:
>>
>> All,
>>
>> I'm pretty new to AudioUnit and I have reached the stage where I can
>> generate a pretty simple sine wave with or without FM modulation or PM
>> modulation by another sine wave.
>>
>> I'm using a unit test (SenTest) to debug as I go, and I have noticed
>> something I do not seem to be able to develop an understanding of.
>>
>> When I run my test, every other time, the whole test suite runs fine, with
>> exactly the kind of sounds I am expecting to hear:
>>
>> FM:
>> - test1: a carrier at 440 modulated at 8Hz with a 20Hz "swing" around 440
>> - test2: a carrier at 440 modulated at 200Hz with a 40Hz "swing" around
>> 440
>> - test3: a carrier at 440 modulated at 400Hz with a 80Hz "swing" around
>> 440
>> PM:
>> - test4: a carrier at 440 modulated at 8Hz with a 0.2 "phase swing" (ie 0
>> to 2pi * 0.2)
>> - test5: a carrier at 440 modulated at 200Hz with a 0.4 "phase swing" (ie
>> 0 to 2pi * 0.4)
>> - test6: a carrier at 440 modulated at 400Hz with a 0.8 "phase swing" (ie
>> 0 to 2pi * 0.8)
>>
>> Each test is played for 4 seconds.
>>
>> The problem is that half time I run the above tests from start to finish I
>> hear the above with "high pitched 'static noise'".
>>
>> Also, very often, nearly all the time, but not always I see that one ore
>> more CPU cores getting maxed out
>> (SenTest run on the Simulator, hence the Mac's CPU is producing the
>> sounds).
>> Also, some times, but rarely, I just get a few loud statics for a few
>> milliseconds and then just silence for the rest of that test.
>>
>> Also, if the first test runs OK, it is very likely that all subsequent
>> tests will be ok.
>> Conversely, as soon as a test starts sounding weird, it is almost certain
>> that the following tests will sound funny too.
>>
>> I have tried to insert NSLog into the play callback, but then I'm swamped
>> with miles upon miles of output and the sound is NOT heard anymore.
>>
>> I have instrumented the RemoteIO play callback to record latency, rate of
>> calls, buffer sample size, time I take to fill it, and nothing jumps at me.
>>
>> I was expecting my sample generation to be too slow, but it looks like I
>> complete the buffer filling in about 80 samples per ms where the sampling
>> rate 44100 requires me to fill at least 44.1 such samples per ms ... so the
>> problem must be somewhere else ...
>>
>> Any idea how to go about debugging this?
>>
>> Many Thanks
>> --
>> JFB
>> _______________________________________________
>> 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
>
_______________________________________________
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