• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: siCompressionParams Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: siCompressionParams Question


  • Subject: Re: siCompressionParams Question
  • From: "Raman Sharma" <email@hidden>
  • Date: Thu, 20 Apr 2006 17:15:30 +0530

I understand that api is deprecated. My point is .. I have just
recently started working on Mac. I have this application on Windows
that I was developed using QuickTime SDK. I wish to use the exact same
code on Mac.

What do I do ?

On 4/20/06, Jeff Moore <email@hidden> wrote:
>
>
> On Apr 19, 2006, at 3:17 AM, Raman Sharma wrote:
>
> > Unfortunately I will have to use the Sound Converter for some more
> > time.
>
> Whatever. The Sound Manager is deprecated (and has been for a very
> long time). You take on the risks of using a deprecated API. As you
> have no doubt found, there isn't a whole lot of support left for it.
>
> > 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.
>
> I wouldn't say that. More specifically, you need to be aware of the
> context you are working in. If the codec you are talking to needs to
> have that information set and you get an error, you probably don't
> want to ignore it.
>
> > 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 ?
>
>
> Not really. My guess would be that by changing siCompressionChannels
> you are causing the codec in question to get into some kind of
> inconsistent/illegal state.
>
> > -Raman
> >
> > ps : I really need to stick to Sound Converter for some more time :)
>
> As I said, you take your own risks with that. The Sound Manager has
> it's own set of issues. Good luck with that.
>
>
> >
> > 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:
> >> 40gmail.com
> >>
> >> This email sent to email@hidden
> >>
>
>
> --
>
> 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

  • Follow-Ups:
    • Re: siCompressionParams Question
      • From: Jeff Moore <email@hidden>
References: 
 >siCompressionParams Question (From: "Raman Sharma" <email@hidden>)
 >Re: siCompressionParams Question (From: Jeff Moore <email@hidden>)
 >Re: siCompressionParams Question (From: "Raman Sharma" <email@hidden>)
 >Re: siCompressionParams Question (From: Jeff Moore <email@hidden>)

  • Prev by Date: RE: Crashing Auval
  • Next by Date: Re: siCompressionParams Question
  • Previous by thread: Re: siCompressionParams Question
  • Next by thread: Re: siCompressionParams Question
  • Index(es):
    • Date
    • Thread