Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 5    Views: 215

ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
04/29/12 04:58 PM (13 years ago)

Audio Solution No Sound

Hi everyone, there have been some reports in the Apple App Store of BT apps having no sound...i suggest adding this code to your IOS projects...it has been tested and found needed to avoid some negative reviews in the app store. This overrides the silent mode. This fixes the problem, in your Xcode Project find your BT_Config folder, in this folder you will find yourAppName_appDelegate.m file....scroll down pretty far in this file to around line 880 just after the array list of .mp3 sound effects you will see this code //setup audio session for background sounds. Allow iPod to continue if it's already playing. [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryAmbient error: nil]; [[AVAudioSession sharedInstance] setActive: YES error: nil]; NOW just after that code paste the code below...you should now have audio and video playing regardless of mute switch on side of device...i tested and worked for me. Fixed the problem for disgruntled users. // prevent mute switch from switching off audio from movie player NSError *_error = nil; [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &_error];
 
bracesport
Apple Fan
Profile
Posts: 49
Reg: Jun 02, 2011
Wellington
490
like
04/29/12 06:54 PM (13 years ago)
I got a notification today from an iPad3 user.. very interesting stuff!! thanks for the code.. Ill add that too regards phil
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
04/29/12 07:18 PM (13 years ago)
Cool :)
 
Mackimack
Apple Fan
Profile
Posts: 481
Reg: Dec 30, 2010
Sweden
14,310
like
04/29/12 10:23 PM (13 years ago)
Nice!
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
06/07/12 05:48 AM (13 years ago)
I put this in my latest update for a client's app, and she still just got another review saying there was no audio in the videos. The screen type is a "streaming video" using a local mov in the bundle. Using BT v1.5 on iOS Of the several questions she received about audio not working, most were fixed by telling the user to check the mute switch. But some have not had success by using the switch. Any ideas?
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
12/06/12 04:58 PM (13 years ago)
Hi Stobe, Revisiting this. Any further details on your end? I know it's old v1.5 but good to k ow if this should be addressed for future plugins?
 

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.