Re: Audio problem
Re: Audio problem
- Subject: Re: Audio problem
- From: Brad Ford <email@hidden>
- Date: Thu, 15 Feb 2007 12:13:28 -0800
Try running your source through scaudiocompress (test app). Is the duration of the resulting movie short? If so, please file a bug at bugreport.apple.com
-Brad Ford QuickTime Engineering On Feb 15, 2007, at 10:46 AM, Sandeep Chandna wrote: I am stuck with my problem and am seeking some answers. When using QDesign my output duration is shorter than input when I use 10 or more packets, it works fine sometimes with 5 packets but gets stuck for few cases . can anyone help. Please see the below mail for more information on this.
Thanks Sandeep
On 14/02/07, Sandeep Chandna <email@hidden> wrote: 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