• 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: Brad Ford <email@hidden>
  • Date: Sun, 1 Feb 2009 22:17:09 -0800

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

-Brad Ford
QuickTime Engineering

On Feb 1, 2009, at 9:54 PM, James Udo Ludtke wrote:


On 2009 02 1, at 12:02 AM, Brad Ford wrote:

<snip>

Item 2 can be done easily by deleting: err = SCRequestImageSettings(ci);

I do need help with item 1.
The default rate selected in the dialogue is 22050. How can I set the default value to one of the other suggested values, such as 44100?


Sounds like you're using a QuickTime component for the duologue. It's unclear which one you're using, scdi/soun, or scdi/audi? The latter is the preferred method. scaudiocompress sample code shows how to configure the SCAudio component. You provide it an output asbd before displaying the duologue, and it will contain the sample rate from the output asbd you provided.

-Brad Ford
QuickTime Engineering

Thanks Brad,

I had a look at the scaudiocompress sample code. It throws up the dialogue which I use. So I used it as a test bed.

-----
Using the adopted sample code:

AudioChannelLayoutTag tagList[] =
{
kAudioChannelLayoutTag_DiscreteInOrder | numDiscreteInputChannels, // OR in the real discrete number of channels
kAudioChannelLayoutTag_UseChannelDescriptions, // allows passthru of source's whacky custom channel layout (if it has one)

kAudioChannelLayoutTag_Mono,
// kAudioChannelLayoutTag_Stereo,
kAudioChannelLayoutTag_StereoHeadphones, // added option
kAudioChannelLayoutTag_Quadraphonic,
kAudioChannelLayoutTag_MPEG_5_0_A,
<snip>
}


(void)QTSetComponentProperty(globs->stdAudio,
								kQTPropertyClass_SCAudio,
								kQTSCAudioPropertyID_ClientRestrictedChannelLayoutTagList,
								sizeof(tagList),
								tagList);

I can add Stereo Headphones, and delete Stereo form the Channels pop- up box.

----------
However, my search for any constants for the Rate pop-up box did not find anything.


----------
I tried to directly set the asbd sample rate to 96.000KHz using
fprintf(LOG_FILE, "\n*** asbd.mSampleRate = %f\n", asbd.mSampleRate);
asbd.mSampleRate = (Float64) 96000.0;
fprintf(LOG_FILE, "*** asbd.mSampleRate = %f\n", asbd.mSampleRate);


The rate as actually changed, as shown using fprintf,
*** asbd.mSampleRate = 22050.000000
*** asbd.mSampleRate = 96000.000000,
but the output file was still written at 22.050.

----------
Oddly enough when I set inasbd to 96000.0, the file **was** written at 96 KHz, but at the wrong speed, as it was read at 96kHz as well.


So I am stuck how to eliminate all the rate entries in the dialogue except the one I want.
Can I go to the well once more for hint how to proceed?


Have a nice day,
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
  • Follow-Ups:
    • Re: AIFFWriter - Select Output Encoding Format dialog box
      • From: James Udo Ludtke <email@hidden>
References: 
 >Re: AIFFWriter - Select Output Encoding Format dialog box (From: James Udo Ludtke <email@hidden>)

  • Prev by Date: Re: Questions about AudioStreamBasicDescription
  • Next by Date: capture audio-in
  • Previous by thread: Re: AIFFWriter - Select Output Encoding Format dialog box
  • Next by thread: Re: AIFFWriter - Select Output Encoding Format dialog box
  • Index(es):
    • Date
    • Thread