Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-12-2010, 03:32 PM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 40
darrenf is on a distinguished road
Default AVAudioPlayer

Hey, I'm making a drum machine app and I've came across a problem.

Each drum pad in my app has its on AVAudioplayer as a property. When the user touches one of the drum pads, the drum pad object tells its AVAudioplayer to play. Here's the problem, if the user touches the drum pad then quickly touches again all I can do is set the current play time back to 0, But that doesn't sound like a realistic drum set. What I would like to do is play the same sound over the top of the currently playing sound.

I thought of doing it like this. When the pad is touched, check to see if its AVAudioplayer is playing, if so, create a new AVAudioplayer with the same sound and play that.

There must be a better way of doing this tho. Any ideas?
Thanks in advance.
darrenf is offline   Reply With Quote
Old 09-12-2010, 03:43 PM   #2 (permalink)
Registered Member
 
headkaze's Avatar
 
Join Date: Feb 2010
Posts: 359
headkaze is on a distinguished road
Default

You would be better off using OpenAL for that. Check out iPhone Game Programming – Tutorial 9 – Sound Manager | 71² - The ramblings of two 30-something developers
headkaze is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 343
11 members and 332 guests
cgokey, fiftysixty, givensur, iGamesDev, jenniead38, linkmx, mraalex, PixelInteractive, raihan.zbr, Trickphotostudios
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:02 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0