Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
8d920651
Commit
8d920651
authored
May 26, 2017
by
Rémi Verschelde
Committed by
GitHub
May 26, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8916 from sanikoyes/Pr-fix_audio_stoped_iOS
Fix audio can't resume in iOS platform
parents
755c07af
7d374b59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
app_delegate.mm
platform/iphone/app_delegate.mm
+5
-0
audio_driver_iphone.cpp
platform/iphone/audio_driver_iphone.cpp
+5
-0
No files found.
platform/iphone/app_delegate.mm
View file @
8d920651
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#import "gl_view.h"
#import "gl_view.h"
#include "main/main.h"
#include "main/main.h"
#include "os_iphone.h"
#include "os_iphone.h"
#include "audio_driver_iphone.h"
#ifdef MODULE_FACEBOOKSCORER_IOS_ENABLED
#ifdef MODULE_FACEBOOKSCORER_IOS_ENABLED
#include "modules/FacebookScorer_ios/FacebookScorer.h"
#include "modules/FacebookScorer_ios/FacebookScorer.h"
...
@@ -735,6 +736,10 @@ static int frame_count = 0;
...
@@ -735,6 +736,10 @@ static int frame_count = 0;
if (OSIPhone::get_singleton()->native_video_is_playing()) {
if (OSIPhone::get_singleton()->native_video_is_playing()) {
OSIPhone::get_singleton()->native_video_unpause();
OSIPhone::get_singleton()->native_video_unpause();
};
};
// Fixed audio can not resume if it is interrupted cause by an incoming phone call
if(AudioDriverIphone::get_singleton() != NULL)
AudioDriverIphone::get_singleton()->start();
}
}
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
...
...
platform/iphone/audio_driver_iphone.cpp
View file @
8d920651
...
@@ -148,6 +148,11 @@ OSStatus AudioDriverIphone::output_callback(void *inRefCon,
...
@@ -148,6 +148,11 @@ OSStatus AudioDriverIphone::output_callback(void *inRefCon,
void
AudioDriverIphone
::
start
()
{
void
AudioDriverIphone
::
start
()
{
active
=
true
;
active
=
true
;
// Resume audio
// iOS audio-thread stoped if it is interrupted cause by an incoming phone call
// Use AudioOutputUnitStart to re-create audio-thread
OSStatus
result
=
AudioOutputUnitStart
(
audio_unit
);
ERR_FAIL_COND
(
result
!=
noErr
);
};
};
int
AudioDriverIphone
::
get_mix_rate
()
const
{
int
AudioDriverIphone
::
get_mix_rate
()
const
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment