Discussion Forums  >  Audio, Video, Playing, Recording

Replies: 6    Views: 110

photoserge
Aspiring developer
Profile
Posts: 146
Reg: Jan 01, 2012
paris
5,410
04/25/12 02:37 PM (13 years ago)

audio trouble when silent mode is on

Hello Guys, please see this thread : http://www.buzztouch.com/forum/thread.php?tid=6F7700F599243000572089A&command=isSearching&currentPage=1&topicTitle=silent%20mode&createdBy=&repliedBy=&minViews=-1&maxViews=-1&minReplies=-1&maxReplies=-1&forumCategory= I still dont know how to solve my problem, I keep on getting bad reviews on my apps because people dont understand that when silent mode is on, even though you change change the volume, there will be no audio until the silent mode is switch off. This is not considered as a bug as it is the default behavior of buzztouch, however it is suprising to most people and they think it's a bug because it is not the default behavior of other apps playing videos. So David suggested in the above thread that I copy and paste some code to change that, but I'm bad at coding and need more simple explanations of where EXACTLY should I copy that code. Tks so much if someone can help. Serge
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
04/27/12 11:15 PM (13 years ago)
Hi photoserge, so it is definitely confirmed that toggling silent mode fixes the problem in all cases? I have an app that has some complaints about no sound and users are saying that toggling silent mode makes no difference so maybe something else is funky....I am going to look into placing the code David suggested and will post back with findings...keep u posted :)
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
04/29/12 01:15 AM (13 years ago)
Hi, this should fix your 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. // prevent mute switch from switching off audio from movie player NSError *_error = nil; [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &_error];
 
photoserge
Aspiring developer
Profile
Posts: 146
Reg: Jan 01, 2012
paris
5,410
like
04/30/12 09:21 AM (13 years ago)
Hey tks you so much Ianjamespiano !!! You are the king, a life saver, I have been trying on various forums to get an answer to this with no success and it works !!! I suggest anybody doing videos on their buzztouch apps to implement this, they will get better reviews and less mail to support ! Tks again. Serge
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
04/30/12 09:25 AM (13 years ago)
Glad to help, this definitely fixed the problem..I had users that were complaining test the new code and it worked great..all happy :)
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
05/02/12 07:38 AM (13 years ago)
thanks for the tip here, i just noticed this on an app i'm working on. i'll add that code as well. i'm surprised how much useful hacking in done in that youapp_appDelegate.m file.
 
arun_s
Aspiring developer
Profile
Posts: 7
Reg: Jan 19, 2013
Dallas
1,720
like
01/29/13 10:47 AM (13 years ago)
I just ran into this problem... added the code mentioned and got it working in my first app... no real questions here... just a big THANK YOU to this forum!
 

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.