Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 11    Views: 98

Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
06/27/12 06:16 PM (13 years ago)

sound in quiz plugin

I can't get sound to play with the quiz plugin on a correct or wrong answer. I am on 2.0 self hosted. I selected (and uploaded) a sound effects in the control panel, but it still won't play. I have the two sound effects in my project under the BT_Sound folder, and have run it from Xcode after adding the files. I know I won't be changing this so I thought I would look at the code and just enter the name there, but that docent work either? In the code where would I add the file name right.mp3? I tried removing quizSoundEffectFileNameCorrect and just entering @"right.mp3" and also tried just putting it into the open @"" right after that but neither worked?? (also tried it in both spots) Any ideas? //answer was correct... //do we play sound effect? if([[BT_strings getJsonPropertyValue:self.screenData.jsonVars:@"quizSoundEffectFileNameCorrect":@""] length] > 3){ [appDelegate playSoundEffect:[BT_strings getJsonPropertyValue:self.screenData.jsonVars:@"quizSoundEffectFileNameCorrect":@""]];
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
06/27/12 07:35 PM (13 years ago)
In your appDelegate.m file, search for //fill an array of sound effect file names self.soundEffectNames = [[NSMutableArray alloc] init]; Uncomment the list of mp3 files. Sound effects will work great after that.
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
06/27/12 07:48 PM (13 years ago)
Thank You!!!!! That was it. It makes sense now why it was not working. I was so focused on the quiz plugin code I never thought to look in the delegate file.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
06/29/12 08:41 AM (13 years ago)
MGo to the rescue again..... Did you guys load all the effects or just then ones you need? Curious if there is any performance difference. I just loaded the one. and those sounds HAVE to be in the BT_Sound folder to work? didn't seem to work unless i did that, even with the file being int he plug-in folder. and WOW, what a treasure trove that plug-in is to play with and analyze and learn from.... trying to decide now if i want a "BUZZ" for the wrong answer. just might have to dig up that 'vibrate' code i was playing with and apply it to this....
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
08/14/12 11:22 AM (13 years ago)
One more note to this--if you don't include all of the sound files, you need to only uncomment the sound files you have included. If not, you get the SIGABRT error. Thank you, @MGoBlue!
 
bioninja
Lost but trying
Profile
Posts: 71
Reg: Jul 08, 2012
Melbourne
2,860
like
08/18/12 08:51 PM (13 years ago)
Hi, I'm having the same problem. Quick question, how do you "uncomment the list of mp3 files"?
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
08/18/12 08:54 PM (13 years ago)
Add // before the list of mp3 files you dont want to use.
 
bioninja
Lost but trying
Profile
Posts: 71
Reg: Jul 08, 2012
Melbourne
2,860
like
08/18/12 09:12 PM (13 years ago)
Never mind. Figured it out :)
 
scottt
Aspiring developer
Profile
Posts: 3
Reg: Aug 02, 2012
Rogersville
6,430
like
09/04/12 05:38 PM (13 years ago)
Hi, I'm new to Buzztouch and loving it so far. I'm finishing up my first app, but can't get the audio to work for the quiz. I've searched through all the threads on this topic and have tried all suggestions. Getting really frustrated. The "right.mp3" file is in the BT_Sound folder. Below is the list of sounds in the appDelegate.m file. Did I uncomment them correctly and does anyone know anything else I can try? Thanks in advance for your help. /* //[self.soundEffectNames addObject:@"basso.mp3"]; //[self.soundEffectNames addObject:@"blow.mp3"]; //[self.soundEffectNames addObject:@"bottle.mp3"]; //[self.soundEffectNames addObject:@"frog.mp3"]; //[self.soundEffectNames addObject:@"funk.mp3"]; //[self.soundEffectNames addObject:@"glass.mp3"]; //[self.soundEffectNames addObject:@"hero.mp3"]; //[self.soundEffectNames addObject:@"morse.mp3"]; //[self.soundEffectNames addObject:@"ping.mp3"]; //[self.soundEffectNames addObject:@"pop.mp3"]; //[self.soundEffectNames addObject:@"purr.mp3"]; [self.soundEffectNames addObject:@"right.mp3"]; //[self.soundEffectNames addObject:@"sosumi.mp3"]; //[self.soundEffectNames addObject:@"submarine.mp3"]; //[self.soundEffectNames addObject:@"tink.mp3"]; */
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
09/04/12 05:48 PM (13 years ago)
Hi Scott, You need to delete the /* and the */ at the start and end of the list. This comments out everything that within them.
 
scottt
Aspiring developer
Profile
Posts: 3
Reg: Aug 02, 2012
Rogersville
6,430
like
09/04/12 06:39 PM (13 years ago)
That fixed it!! Thanks so much for your help.
 
scottt
Aspiring developer
Profile
Posts: 3
Reg: Aug 02, 2012
Rogersville
6,430
like
09/04/12 06:41 PM (13 years ago)
That fixed it!! Thanks so much for your help.
 

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.