• 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
Sample rate conversion on iOS 3.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sample rate conversion on iOS 3.2


  • Subject: Sample rate conversion on iOS 3.2
  • From: Marc Haisenko <email@hidden>
  • Date: Wed, 13 Oct 2010 18:39:08 +0200

Hi folks,

I'm trying to set up a converter to just change the sample rate of a stream on iOS 3.2, but it seems that this is not supported.

What I'm doing:

---[snip]---
AudioStreamBasicDescription outDescription = { 0 };
outDescription.mFormatID = kAudioFormatLinearPCM;
outDescription.mFormatFlags = kAudioFormatFlagIsSignedInteger;
outDescription.mFramesPerPacket  = 1;
outDescription.mBitsPerChannel = 16;
outDescription.mSampleRate = 48000;
outDescription.mChannelsPerFrame  = 2;
outDescription.mBytesPerPacket  = sizeof(SInt16) * outDescription.mChannelsPerFrame;
outDescription.mBytesPerFrame  = sizeof(SInt16) * outDescription.mChannelsPerFrame;

AudioStreamBasicDescription inDescription = outDescription;
outDescription.mSampleRate = 32000;

AudioConverterRef converter_;
OSStatus result = AudioConverterNew(&inDescription, &outDescription, &converter);
// result == 'fmt?'
---[/snip]---

I always get back kAudioConverterErr_FormatNotSupported/'fmt?' and don't understand why. If the sample rate is the same in inDescriptor and outDescriptor it works, even if the number of channels is different. But as soon as the sample rates differ I get the error. Tried setting the input sample rate higher or lower than the output sample rate, same result.

Is there a work-around or something that I'm not aware of ?
Thanks a lot,
Marc

---
Marc Haisenko
Software Developer

equinux Aktiengesellschaft · Kirschstr. 35 · 80999 München - Germany
http://www.equinux.com/de

equinux USA Inc., 100 Produce Ave #L, South San Francisco, CA 94080 - USA
http://www.equinux.com

Vorstand: Till Schadde  -  Aufsichtsrat (Vors.): Stefan Neuenhahn
Sitz: München  -  Registergericht: Amtsgericht München HRB 129700


Stay tuned what's going on at equinux
equinux Blog | equinux @ Twitter | equinux @ Facebook

 _______________________________________________
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: Sample rate conversion on iOS 3.2
      • From: William Stewart <email@hidden>
  • Prev by Date: VoiceProcessingIO : intermittent startup difficulties
  • Next by Date: Virtual audio device glitches
  • Previous by thread: Re: VoiceProcessingIO : intermittent startup difficulties
  • Next by thread: Re: Sample rate conversion on iOS 3.2
  • Index(es):
    • Date
    • Thread