• 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
iPhone dev- playing sounds defined by the duration of the tap
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iPhone dev- playing sounds defined by the duration of the tap


  • Subject: iPhone dev- playing sounds defined by the duration of the tap
  • From: Christopher Hansson <email@hidden>
  • Date: Wed, 21 Apr 2010 10:54:44 -0800
  • Importance: Normal

Hello,
I have successfully made an app that does -almost- exactly what I want. In a sense I want the UIButtons to trigger like a synthesizer (or sampler, rather), by which the sound file that is played will play for the as long or short as the user holds the button. 
How I have it set up now is using AudioServicesPlaySystemSound on the Touch Down event from the buttons. This works great, there is very little/no latency between tapping the button and getting the sound to play. However it triggers the whole sample, and I would like it to stop playing as soon as the user lifts their finger from the button.
Symbiotically, I only want one sound playing at a time. 
I have looked through the documentation and have yet to find anything in the SystemSounds that calls Stop or Pause. I have chosen SystemSounds for how quickly it can respond to touches. 
I understand there are a couple other frameworks to play sounds, but I've read those induce some latency in calling multiple sound files. 
The files I'm working with will be no longer than 4 seconds a piece, CAF format. I am open to using different formats, as well as rewriting my code to get this properly implemented. 
Thank you all in advance! I have already learned so much just from reading the subscription. 


The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail. Get busy.
 _______________________________________________
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: iPhone dev- playing sounds defined by the duration of the tap
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: Audio Units, Graphs, iphone & remoteIO
  • Next by Date: Re: iPhone dev- playing sounds defined by the duration of the tap
  • Previous by thread: Re: Audio Units, Graphs, iphone & remoteIO
  • Next by thread: Re: iPhone dev- playing sounds defined by the duration of the tap
  • Index(es):
    • Date
    • Thread