Re: siCompressionParams Question
Re: siCompressionParams Question
- Subject: Re: siCompressionParams Question
- From: "Raman Sharma" <email@hidden>
- Date: Wed, 19 Apr 2006 15:47:26 +0530
Unfortunately I will have to use the Sound Converter for some more
time. I found that the problem occurs after calling the following
function :-
SoundConverterSetInfo(m_sc, siCompressionChannels, &numOutChannel);
The sample code you suggested has a comment saying that the return
code of the above function can be ignored as not all components
support this selector. Interistingly, the return value of this
function is always success, and if I "do not" call this function, then
the information returned by :-
err = SoundConverterGetInfo(sc, siCompressionFactor, &destCompInfo);
seems to be correct.
Again, this behaviour is seen only for codecs with custom data. For
others, things work fine even if I call the above APIs.
Any clues ?
-Raman
ps : I really need to stick to Sound Converter for some more time :)
On 4/19/06, Jeff Moore <email@hidden> wrote:
> First off, you _really_ should be using the AudioConverter API in
> <AudioToolbox/AudioConverter.h> to do this work. The Sound Manager is
> deprecated and it is not recommended that folks write new code using it.
>
> That said, my guess is that the reason you are having an issue is
> that you are setting the convert up incorrectly. If you insist on
> using the Sound Converter, you might want to check out some of the
> sample code in the QT SDK, one bit of which can be found here: http://
> developer.apple.com/samplecode/soundconverter/soundconverter.html
>
> On Apr 18, 2006, at 7:01 AM, Raman Sharma wrote:
>
> > I am trying to decompress audio and compress it back. Everything goes
> > haywire when I call the following sequence of functions :-
> >
> > err = SoundConverterGetInfo(sc, siCompressionParams, &destCompParams);
> > if (err == noErr)
> > err = SoundConverterSetInfo(sc, siCompressionParams,
> > *destCompParams);
> >
> > After calling the functions above when I call :-
> > err = SoundConverterGetInfo(sc, siCompressionFactor, &destCompInfo);
> >
> > the value of destCompInfo.bytesPerPacket is zero.
> >
> > Interestingly this happens only in case of the codecs which have
> > custom data. Because in other cases the function SoundConverterSetInfo
> > above is not called and everything works fine. Anyone knows what could
> > be going wrong ?
>
>
> --
>
> Jeff Moore
> Core Audio
> Apple
>
>
> _______________________________________________
> 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