Chromium Code Reviews

Unified Diff: webrtc/modules/utility/source/helpers_ios.mm

Issue 1401963002: Adds support for Bluetooth headsets to the iOS audio layer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: nits Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: webrtc/modules/utility/source/helpers_ios.mm
diff --git a/webrtc/modules/utility/source/helpers_ios.mm b/webrtc/modules/utility/source/helpers_ios.mm
index d36253072d71b45dcb9601c4ff3f4ebb4d9b4546..cca4c11fbb40ea8480ec1544991d8aff51deafb5 100644
--- a/webrtc/modules/utility/source/helpers_ios.mm
+++ b/webrtc/modules/utility/source/helpers_ios.mm
@@ -10,6 +10,7 @@
#if defined(WEBRTC_IOS)
+#import <AVFoundation/AVFoundation.h>
#import <Foundation/Foundation.h>
#import <sys/sysctl.h>
#import <UIKit/UIKit.h>
@@ -57,6 +58,11 @@ std::string GetCurrentThreadDescription() {
return StdStringFromNSString(name);
}
+std::string GetAudioSessionCategory() {
+ NSString* category = [[AVAudioSession sharedInstance] category];
+ return StdStringFromNSString(category);
+}
+
std::string GetSystemName() {
NSString* osName = [[UIDevice currentDevice] systemName];
return StdStringFromNSString(osName);

Powered by Google App Engine