• 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: Audio problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Audio problem


  • Subject: Re: Audio problem
  • From: "Sandeep Chandna" <email@hidden>
  • Date: Wed, 14 Feb 2007 18:35:12 +0530

Brad, thanks for replying.

I tried 10 packets, but that didnt solve my problem. When my input is 48khz and output is 44khz everything is fine but when I use 22khz or lesser output frequency (for same input frequency), SCAudioFillBuffer is not returning me all the encoded packets. So my output audio duration is lesser than input duration and I get lip-sync issues. I noticed that by using 5 packets my output showed 2445312 samples (QTPro->Show movie props) whereas while using 10 packets I got 2428928 packets , That is QDesign dropped some 16k samples which is close to 1 second of audio.

Also, as I mentioned in my last mail, I cant use 5 packets for QDesign (which works sometimes) because SCAudioFillBuffer goes into endless loop of returning blank packets and gets stuck

I have been trying various things (different packet sizes) but with no luck.

Should not SCAudioFillBuffer return whatever is being fed to it?

My code is for both Win/MAC so I cant switch to AudioConverter API also. Please help!!

Thanks
Sandeep

On 12/02/07, Brad Ford <email@hidden> wrote:

On Feb 12, 2007, at 10:11 AM, Sandeep Chandna wrote:

> Hi,
>
>        I am using SCAudioFillBuffer to encode my audio in QDesign
> format but am facing a weird issue.
>
>        If I set the number of packets to 50 , SCAudioFillBuffer
> returns me lesser number of packets than expected and so I get
> blank audio in the end.


QDesign audio packets are huge.  There very likely isn't 50 packets
worth of source material if you're getting less than you asked for.

>
>        Whereas if I set the number of packets to 5, the behaviour
> is undefined. Sometimes encoded file has full audio, at other times
> SCAudioFillBuffer keeps returning
>        blank data endlessly and I have to forcibly terminate the
> loop. I am setting the endOfStream in the mySCAudioCallBack
> properly , is SCAudioFillBuffer broken for
>        QDesign ? or am I missing something ?

This is a quirky behavior of QDesign.  SCAudio doesn't expose a
property to ask the minimum number of packets required by a format,
but AudioConverter does, so you could verify this behavior by
substituting your SCAudioFillBuffer stuff with
AudioConverterFillComplexBuffer on an AudioConverter instance.  I
believe QDesign requires a minimum of 10 packets.

-Brad Ford
QuickTime Engineering




 _______________________________________________
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: Audio problem
      • From: "Sandeep Chandna" <email@hidden>
References: 
 >Audio problem (From: "Sandeep Chandna" <email@hidden>)
 >Re: Audio problem (From: Brad Ford <email@hidden>)

  • Prev by Date: Re: Looking for AUTimePitch
  • Next by Date: SCAudioFillBuffer returns -108
  • Previous by thread: Re: Audio problem
  • Next by thread: Re: Audio problem
  • Index(es):
    • Date
    • Thread