• 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: AIFFWriter - Select Output Encoding Format dialog box
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AIFFWriter - Select Output Encoding Format dialog box


  • Subject: Re: AIFFWriter - Select Output Encoding Format dialog box
  • From: James Udo Ludtke <email@hidden>
  • Date: Mon, 2 Feb 2009 15:11:39 -0500


On 2009 02 2, at 1:17 AM, Brad Ford wrote:

I'm having trouble reading your mind. You will need to share more code.

-Brad Ford
QuickTime Engineering

Maybe it is best to look at it afresh.

I am using the scaudiocompress sample code as a test bed to find a solution I want to put in my code. If I can scaudiocompress to do what I want it to do, I can transfer the solution my own code.

-----
This is how the **unmodified** scaudiocompress sample code works.

Before the extracted and converted audio is saved to a file, a dialogue appears, which allows the user to make certain selections. I am only interested in the rate setting. The dialogue offers 13 rates to chose from in the drop-down box ranging from 8.000 Hz to 192.000 kHz. When the dialogue opens, one of the rates is highlighted. If the user makes no changes, this is the rate at which the sound file is saved.

I have found that the highlighted rate is the input file rate. However, the file can also be saved at any one of the other 12 rates if selected by the user.

Q1. Somewhere there must be a record of the 12 rates displayed. Where is that record? How can I get access to it?

I want the highlighted rate to be, say 44.100 kHz, regardless of the rate of the input file.

-----
Not being able to get at the record of rates displayed in the dialogue, I added **one** line of code, commented with // xxxx, near line 700 in scaudiocompress.c, as follows:


{
fprintf(LOG_FILE, "### ConfigureStdAudio() called without a source AudioFileID or Movie!\n");
err = paramErr;
goto bail;
}

inasbd.mSampleRate = (Float64) 96000.0; // xxxx - added line

// set the input desc info on stdaudio
err = QTSetComponentProperty( globs->stdAudio, kQTPropertyClass_SCAudio,
kQTSCAudioPropertyID_InputBasicDescription,
sizeof(inasbd), &inasbd );
if (err)
{
fprintf(LOG_FILE, "### QTSetComponentProperty(stdaudio, InputBasicDescription) returned err %ld\n", err);
goto bail;
}


With this line added, 96.000 kHz is selected in the dialogue, and the file is saved at 96.000 kHz. So far so good. However, since I changed the rate in inasbd, the input file is also read at 96.000 kHz, which I do not want. The input file must be read at its native rate.

Q2. What else might I try to work around the lack of access to the dialogue rate record?

James

_______________________________________________
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


References: 
 >Re: AIFFWriter - Select Output Encoding Format dialog box (From: James Udo Ludtke <email@hidden>)
 >Re: AIFFWriter - Select Output Encoding Format dialog box (From: Brad Ford <email@hidden>)

  • Prev by Date: Re: capture audio-in
  • Next by Date: Re: How to keep view and audio unit aware of each other
  • Previous by thread: Re: AIFFWriter - Select Output Encoding Format dialog box
  • Next by thread: Re: How to keep view and audio unit aware of each other
  • Index(es):
    • Date
    • Thread