• 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
AUNewTimePitch distorted on iOS device but fine in simulator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AUNewTimePitch distorted on iOS device but fine in simulator


  • Subject: AUNewTimePitch distorted on iOS device but fine in simulator
  • From: Matthew Daugherty <email@hidden>
  • Date: Mon, 26 Nov 2012 14:26:59 -0500

I am trying to put together a simple iOS 6 app that reads an audio file from the bundle and plays it back with variable speed.

I have created the following AU Graph:

AUAudioFilePlayer -> AUNewTimePitch -> AURemoteIO

I have set the audio format of AUAudioFilePlayer and AURemoteIO to match the format used by AUNewTimePitch.  CAShow() confirms that all the units are using the same data format:

AudioUnitGraph 0x2C17001:
  Member Nodes:
node 1: 'auou' 'rioc' 'appl', instance 0x1d857c00 O I
node 2: 'augn' 'afpl' 'appl', instance 0x1d863120 O I
node 3: 'aufc' 'vari' 'appl', instance 0x1d863290 O I
  Connections:
node   2 bus   0 => node   3 bus   0  [ 2 ch,  44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
node   3 bus   0 => node   1 bus   0  [ 2 ch,  44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved]
  CurrentState:
mLastUpdateError=0, eventsToProcess=F, isRunning=F

If I run this app in the simulator it works fine.  If I run it on my iPhone 5 the sound is distorted; my hearing is not that great but it sounds like the audio is being amplified and clipped.  This is true even if I set the kNewTimePitchParam_Rate to 1.0.

As I was looking for answers to this I came across Chris Adamson's sample app from CocoaConf Portland that does exactly what I wanted.  Unfortunately his app has the exact same behavior; it sounds fine in the simulator but is distorted when run from the device.

If I remove the AUNewTimePitch unit and connect AUAudioFilePlayer directly to AURemoteIO everything sounds fine on the device.  If I replace AUNewTimePitch with a different unit such as Varispeed it also sounds fine.

I would appreciate any help or suggestions.

Thanks,

Matt
 _______________________________________________
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: AUNewTimePitch distorted on iOS device but fine in simulator
      • From: Chris Adamson <email@hidden>
  • Prev by Date: Re: HAL plugin (user-space driver) sandbox entitlements
  • Next by Date: Re: AUNewTimePitch distorted on iOS device but fine in simulator
  • Previous by thread: Re: HAL plugin (user-space driver) sandbox entitlements
  • Next by thread: Re: AUNewTimePitch distorted on iOS device but fine in simulator
  • Index(es):
    • Date
    • Thread