Re: AudioConverterDispose() and szone_error
Re: AudioConverterDispose() and szone_error
- Subject: Re: AudioConverterDispose() and szone_error
- From: William Stewart <email@hidden>
- Date: Fri, 17 Sep 2004 14:38:42 -0700
On 17/9/04 12:43 PM, "Robert Grant" <email@hidden> wrote:
> Hey Katsura,
>
> Thanks for the advice. It turns out I wasn't allocating enough space
> for the output buffer and I guess I was getting overruns.
>
> So the question becomes - how do you accurately calculate the output
> buffer size for AudioConverterFillComplexBuffer?
Ah... Well, the converter is a pull model, and it should provide you with as
much data as it can when you ask it to produce data up to the limit of the
size you are requesting.
There's a property that you can use to calculate for this input, what output
would I need to get...
>
> Here's what I had:
>
> m_outputData.mBuffers[0].mData = malloc(8192);
> m_outputData.mBuffers[0].mNumberChannels = 2;
> m_outputData.mBuffers[0].mDataByteSize = 2048;
This figure is a data BYTE size - so should be set to the size in bytes of
the buffer you have (which in this case would be 8192 bytes)
>
> I thought that it would use 4Kb (2 x 2048) and leave an 4Kb, but it
> didn't - making it malloc(16384) gave it the room it needed.
>
> A bit confused...
So am I = it sounds to me like there's a discrepancy between the format and
the buffer list layout (and its allocations) = possibly the AudioConverter
is not catching something here that it should be?
Bill
>
> Robert.
>
>
> On Sep 17, 2004, at 2:50 PM, Hidetomo Katsura wrote:
>
>> try using MallocGuardEdges (or libgmalloc.B.dylib) since it might be
>> caused by overrunning (or underrunning) allocated memory.
>>
>> http://developer.apple.com/releasenotes/DeveloperTools/
>> MallocOptions.html
>>
>> http://outofcheese.org/archives/2004/05/19.html
>>
>> regards,
>> katsura
>>
>> On Sep 17, 2004, at 11:34 AM, Robert Grant wrote:
>>
>>> I posted this a while back, it's still causing trouble and I didn't
>>> get any takers last time, so...
>>>
>>> Can anyone provide insight as to what might be causing this. My work
>>> around is to leak the AudioConverter - not very impressive... :-(
>>>
>>> Thanks,
>>>
>>> Robert.
>>>
>>> Begin forwarded message:
>>>
>>>> From: Robert Grant <email@hidden>
>>>> Date: July 16, 2004 5:33:08 PM EDT
>>>> To: CoreAudio API <email@hidden>
>>>> Subject: AudioConverterDispose() and szone_error
>>>>
>>>> I'm getting an szone_error when I try to release an AudioConverter.
>>>> It's not happening all the time - only when I'm converting from
>>>> 32-bit to 24-bit. 32->16 conversion is fine.
>>>>
>>>> Here's the partial stack trace:
>>>>
>>>> #0 0x9008df7c in szone_error
>>>> #1 0x9000db84 in small_free_list_remove_ptr
>>>> #2 0x90001a68 in szone_free
>>>> #3 0x93b5573c in operator delete(void*)
>>>> #4 0x93b59798 in operator delete[](void*)
>>>> #5 0x93b57068 in BufferedAudioConverter::~BufferedAudioConverter()
>>>> #6 0x93b5b8a0 in CBRConverter::~CBRConverter()
>>>> #7 0x93b5a540 in Reinterleaver::~Reinterleaver()
>>>> #8 0x93b59bfc in AudioConverterChain::~AudioConverterChain()
>>>> #9 0x93b5b824 in AudioConverterDispose
>>>>
>>>> I've shut down the background thread that was doing the conversion
>>>> so the converter should be quiescent. But it seems like it isn't.
>>>>
>>>> Once an AudioUnitRemoveRenderNotify completes the notify proc is no
>>>> longer called right?
>>>>
>>>> Thanks,
>>>>
>>>> Robert.
>>>> _______________________________________________
>>>> coreaudio-api mailing list | email@hidden
>>>> Help/Unsubscribe/Archives:
>>>> http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>>>> Do not post admin requests to the list. They will be ignored.
>>>>
>>>
>>> _______________________________________________
>>> 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
--
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
Culture Ship Names:
Ravished By The Sheer Implausibility Of That Last Statement [GSV]
I said, I've Got A Big Stick [OU]
Inappropiate Response [OU]
Far Over The Borders Of Insanity And Still Accelerating [Eccentric]
__________________________________________________________________________
_______________________________________________
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