• 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
Different signals being produced by iPhone and iPod given the same input
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Different signals being produced by iPhone and iPod given the same input


  • Subject: Different signals being produced by iPhone and iPod given the same input
  • From: Nick Porcaro <email@hidden>
  • Date: Thu, 05 Apr 2012 17:49:34 -0700

Hey folks,

Here's a puzzle for you.

I have an app based on the iOS playthrough example Chris Adamson gave in his book:

http://www.amazon.com/Learning-Core-Audio-Hands-On-Programming/dp/0321636848

Here's what I changed:

- Produce bytes into a TPCircularBuffer in the inputRender callback.

- Detach a thread which fires off a periodic NSTimer.  The NSTimer calls a function
  which comsumes the bytes from the circular buffer, writes them to a wav file, then sends
  them over TCP/IP to another app running on an iPad.


I run this app on an iPhone and iPod touch, then feed the same signal to these devices via an iRig.

Problem:  The files written on the iPod and iPhone touch get out of sync.

When the input is a sinewave:
	http://www.porcaro.org/sinewave.zip

When the input is a from a digital keyboard.
	http://www.porcaro.org/digitalKeyboard.zip

Theories on what's going wrong:

- It seems the iPhone waveform periodically changes its frequency slightly
- The iPod touch and the iPhone's render callbacks are being called a slightly different rates
- There is some kind of resource deadlock going on between the read and write threads that's periodically
   slowing things down.

Any ideas on how to solve this would be greatly appreciated!

- Nick












 _______________________________________________
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

References: 
 >Performance under Instruments (From: Darren Gibbs <email@hidden>)

  • Prev by Date: Performance under Instruments
  • Next by Date: Re: MPMusicPlayerController kills RemoteIO on iPhone Speaker route
  • Previous by thread: Performance under Instruments
  • Next by thread: RE: Performance under Instruments
  • Index(es):
    • Date
    • Thread