Discussion Forums  >  Audio, Video, Playing, Recording

Replies: 12    Views: 164

JouJou
Aspiring developer
Profile
Posts: 20
Reg: Dec 01, 2012
Sydney, Austral...
3,450
12/09/12 09:33 PM (11 years ago)

First Soundboard app

Hi All, Trying to make my first app by making a soundboard. I want to assign an .mp3 to a button but don't want the button to navigate anywhere else. The Tutorial posted on this site uses the an older version of BT and wondering if there's an updated doco?
 
SheriDee
Code is Art
Profile
Posts: 1094
Reg: Sep 23, 2011
location unknow...
22,840
like
12/10/12 01:21 AM (11 years ago)
Webinars are great for finding the gold nuggets too! Starts about 45:43. http://www.youtube.com/watch?v=JkJiSRiWg1g PM me if you need more 1:1 Looking forward to your creation
 
JouJou
Aspiring developer
Profile
Posts: 20
Reg: Dec 01, 2012
Sydney, Austral...
3,450
like
12/10/12 12:58 PM (11 years ago)
Thanks Sheri, Will do. Cheers, Justin
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
12/11/12 03:11 AM (11 years ago)
I find soundboards much easier to create natively. This is one such I created. https://itunes.apple.com/gb/app/id530229411?mt=8 Let me know if you'd like the code. All the best Alex
 
JouJou
Aspiring developer
Profile
Posts: 20
Reg: Dec 01, 2012
Sydney, Austral...
3,450
like
12/11/12 04:39 AM (11 years ago)
Hi Alex, The apps is pretty neat. You're correct, it is easier to create natively, i found sound board code on GeekyLemon. I wouldn't mind grabbing the code off you and comparing it to the one i found on GeekyLemon. Thanks very much for your post. Cheers Justin
 
SheriDee
Code is Art
Profile
Posts: 1094
Reg: Sep 23, 2011
location unknow...
22,840
like
12/11/12 07:15 AM (11 years ago)
Hey Alex, If you have something for the community be a great share for everyone. Thanks! Sheri
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
12/11/12 07:18 AM (11 years ago)
Sure. I'll get something up soon :)
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
12/11/12 02:16 PM (11 years ago)
I don't know if this would suit a plugin? Is it possible to create plugins that come with a nib file that can be adjusted as needed?
 
JouJou
Aspiring developer
Profile
Posts: 20
Reg: Dec 01, 2012
Sydney, Austral...
3,450
like
12/11/12 02:38 PM (11 years ago)
Hi Alex, I'm not sure about that, may have to ask the buzztouch Evangelist :) Cheers Justin
 
ceerup
Code is Art
Profile
Posts: 1033
Reg: Oct 10, 2011
New York City
16,380
like
01/15/13 09:02 PM (11 years ago)
Hey Alex, I'm interested in the code for a soundboard, it would definitely fit my app
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
09/15/13 04:01 PM (10 years ago)
Hello Alex, Could you share your Soundboard code with me please? Please private message me to continue the conversation. Thanks! -- Niraj
 
BandO
I hate code!
Profile
Posts: 153
Reg: Jan 23, 2012
Manhattan
1,530
like
09/16/13 05:22 AM (10 years ago)
@Alex Please share with me as well. Yours is 1000 times better than mine..
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
09/18/13 04:58 AM (10 years ago)
Hi, Very straight forward code for this. .h Firstly you will need to import the AVFoundation/AVAudioPlayer framework. You also need to ensure the AVAudioPlayerDelegate is added and I use AVAudioPlayer *theAudio; to allow you to have control of stopping and playing the audio for when another buttton is pressed. Finally you set up the (IBAction) to be called in the .m I also use an (IBAction) for a separate stop button. .m -(IBAction) playSound:(id)sender{ [theAudio stop]; NSString *path = [[NSBundle mainBundle] pathForResource:@"Anaheim" ofType:@"mp3"]; theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL]; [theAudio play]; } Here we have the code to play the mp3 file named 'Anaheim', stored in the project. For the separate 'Stop' button I use -(IBAction) stop:(id)sender { [theAudio stop]; } Thats it. Very, very straight forward. Hope this helps. All the best.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.