• 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
AudioDeviceSetProperty and setting kAudioDevicePropertyStreamFormat
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioDeviceSetProperty and setting kAudioDevicePropertyStreamFormat


  • Subject: AudioDeviceSetProperty and setting kAudioDevicePropertyStreamFormat
  • From: Rob Frohne <email@hidden>
  • Date: Tue, 1 Mar 2005 17:43:36 -0800

Hi,

I am having a problem playing files with 22 kHz sample rate using this code here. I get this

(OSStatus) 560226676

for err if the sample rate is not 44 kHz. I'm not sure how to get Xcode to tell me what that error is. Somehow the command clicking for the CoreAudio stuff isn't working in my project. (For example, I can't select AudioDeviceSetProperty and command click it and find the definition, etc.)

audio_data.format.mSampleRate = audio_data.sfinfo.samplerate ;
audio_data.format.mChannelsPerFrame = audio_data.sfinfo.channels ;
rate = (int *) &(audio_data.format.mSampleRate);
channels = (int *) &(audio_data.format.mChannelsPerFrame);


//Set the sample rate.
if ((err = AudioDeviceSetProperty (audio_data.device, NULL, 0, false, kAudioDevicePropertyStreamFormat,
sizeof (AudioStreamBasicDescription), &(audio_data.format))) != noErr)
{ printf ("AudioDeviceSetProperty (kAudioDevicePropertyStreamFormat) failed.\n") ;
return -1;
} ;

Any tips or hints would be very welcome!

Thanks,

Rob

--
Rob Frohne, Ph.D., P.E.
E.F. Cross School of Engineering
Walla Walla College
http://www.wwc.edu/~frohro/
 _______________________________________________
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: AudioDeviceSetProperty and setting kAudioDevicePropertyStreamFormat
      • From: Herbie Robinson <email@hidden>
    • Re: AudioDeviceSetProperty and setting kAudioDevicePropertyStreamFormat
      • From: Jeff Moore <email@hidden>
  • Prev by Date: Re: How to deal with kAudioFormatMIDIStream format?
  • Next by Date: Re: AudioDeviceSetProperty and setting kAudioDevicePropertyStreamFormat
  • Previous by thread: Re: How to deal with kAudioFormatMIDIStream format?
  • Next by thread: Re: AudioDeviceSetProperty and setting kAudioDevicePropertyStreamFormat
  • Index(es):
    • Date
    • Thread