Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 11    Views: 63

BuzzingSteve
Aspiring developer
Profile
Posts: 526
Reg: Jun 24, 2011
Vancouver, Cana...
11,660
04/26/13 12:31 AM (12 years ago)

Sound Not Working in Quiz

Quiz is a most excellent plugin. However, one question for those that have used it: - the sound isn't playing if you specify an .mp3 to play when user selects the correct answer. Is there a trick to getting that to work? - I've tried with the default right.mp3 file included with the plugin, and also with my own .mp3 Has anyone used sound successfully in the Quiz? Thanks Steve
 
trouty
I hate code!
Profile
Posts: 338
Reg: Mar 26, 2013
London Outskirt...
4,830
like
04/26/13 12:52 AM (12 years ago)
make sure the mp3 is in your xcode (assuming ios), and named correctly. If i remember correctly, the question right mp3 i left in its default location, the question wrong mp3 i moved into a different folder before it would work. Not at my mac so cant be more specific
 
BuzzingSteve
Aspiring developer
Profile
Posts: 526
Reg: Jun 24, 2011
Vancouver, Cana...
11,660
like
04/26/13 01:04 AM (12 years ago)
Hi Trouty. I'd be curious where you moved the .mp3 to in Xcode...I'm using the right mp3 in it's default location in the plugin. Cheers
 
trouty
I hate code!
Profile
Posts: 338
Reg: Mar 26, 2013
London Outskirt...
4,830
like
04/26/13 01:09 AM (12 years ago)
ok, hang on, i'll do a remote to home...
 
trouty
I hate code!
Profile
Posts: 338
Reg: Mar 26, 2013
London Outskirt...
4,830
like
04/26/13 01:15 AM (12 years ago)
ok, i have right and wrong.mp3 in BT_Plugins/bt_screen_quiz now, iirc, the wrong didnt work from this location. I also have wrong.mp3 in BT_Sound, and from here it IS working. i dont think i have (reward) bonus.mp3 working though, i kinda forgot about it. although i just looked and it wasnt in my quiz config on BT control panel, that may explain it...
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
04/26/13 01:40 AM (12 years ago)
also in the app delegate file you should uncomment the mp3s. that has caused some problems with the audios not initiating!
 
WebNevees
Code is Art
Profile
Posts: 206
Reg: Oct 28, 2012
KL
11,660
like
04/26/13 02:59 AM (12 years ago)
Yes to sum it up you have to do three things: 1-specify your sound effect from the control panel for each item that has sound 2-add it to BT_Sounds group in XCODE 3- add one line for each audio file you want to use in the appdelegate .m file in BT_Config group as follows: [self.soundEffectNames addObject:@"soundright.mp3"]; //soundright.mp3 is my audio file This should be added at around line 1225 in the method: -(void)loadSoundEffects, just under the following line: //fill an array of sound effect file names... self.soundEffectNames = [[NSMutableArray alloc] init]; It should work now
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
04/26/13 05:45 AM (12 years ago)
Hey @BuzzingSteve, Just to advise to make sure you drag your plugins folder over to your Xcode project also! Great advice @buzztouch gang! LA
 
BuzzingSteve
Aspiring developer
Profile
Posts: 526
Reg: Jun 24, 2011
Vancouver, Cana...
11,660
like
04/26/13 06:52 AM (12 years ago)
Thanks guys! Will try this out and see how it goes. Cheers!
 
BuzzingSteve
Aspiring developer
Profile
Posts: 526
Reg: Jun 24, 2011
Vancouver, Cana...
11,660
like
04/30/13 03:18 AM (12 years ago)
@ WebNevees. Messing with the code in Xcode seems a bit counter to the whole plugin just working with some key settings being changed. I'm leery of putting in custom code as it will need to be added each time I create a new app with this plugin. I hope this gets 'fixed' in a future update to the plugin. Thanks
 
WebNevees
Code is Art
Profile
Posts: 206
Reg: Oct 28, 2012
KL
11,660
like
04/30/13 04:01 AM (12 years ago)
@BuzzingSteve Yup that's right, I was surprised we had to do that manually too. I think there is some point to it I am not sure of as yet. Probably since the sound is loaded into memory, you wouldn't want to auto load all the sound files in your app bundle. This needs to be looked into...
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
04/30/13 04:46 AM (12 years ago)
@webneeves -- that is the correct answer.. loading all of the sound into the memory would cause memory issues. @buzzingsteve - just uncomment or add the sound to the list in the appdelegate and you're set. you have to add a few things anyway to the project in order to submit the app.. so its not a huge deal i think.
 

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.