• 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
Problems setting sample rate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems setting sample rate


  • Subject: Problems setting sample rate
  • From: "Rick Cohen" <email@hidden>
  • Date: Thu, 18 May 2006 14:44:20 -0400

Hi folks,

I have a device here (Digidesign Mbox) that allows the user to set
their sample rate from its own control panel, which is called Digi
CoreAudio Manager.  Never mind the fact that this is not available as
a control panel property, that is another subject :(

Anyway, I'm attempting to set the sample rate of my graph to 48000 if
the Mbox is already set to 48000, prior to launching my app.  I'm able
to get that sample rate with the kAudioDevicePropertyNominalSampleRate
property on the Audio Device.

When I try to set the property on my output unit and my audio unit, I
am getting an error result of kAudioUnitErr_PropertyNotWritable
(-10865) when I initialize the graph.

	RequireNoErr(AudioUnitSetProperty(
									  mOutputUnit,
									  kAudioUnitProperty_SampleRate,
									  kAudioUnitScope_Global,
									  0,	// AudioUnitElement      inElement,
									  &sampleRate,
									  sizeof(Float64)
									  ));


	RequireNoErr(AudioUnitSetProperty(
									  mTargetUnit,	// AudioUnit             ci,
									  kAudioUnitProperty_SampleRate,
									  kAudioUnitScope_Global,
									  0,	// AudioUnitElement      inElement,
									  &sampleRate,
									  sizeof(Float64)
									  ));

	result = AUGraphInitialize( mGraph );

Any suggestions would be helpful. Thanks!

     - Rick
_______________________________________________
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: Problems setting sample rate
      • From: "Rick Cohen" <email@hidden>
  • Prev by Date: Re: Audio playing too quickly
  • Next by Date: Re: Problems setting sample rate
  • Previous by thread: Re: Audio playing too quickly
  • Next by thread: Re: Problems setting sample rate
  • Index(es):
    • Date
    • Thread