Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3730)

Unified Diff: webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h

Issue 1945563003: Provide isAudioEnabled flag to control audio unit. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix some bluetooth issue. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h
diff --git a/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h b/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h
index c6738e7a033ccd9856e67c01a941ce20ff157863..cb506c345a9986ea710946de8ec1f6ec82ae1874 100644
--- a/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h
+++ b/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h
@@ -28,11 +28,8 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property(nonatomic, readonly) int webRTCSessionCount;
-/** The configuration of the audio session before configureWebRTCSession
- * was first called.
- */
-@property(nonatomic, strong, nullable)
- RTCAudioSessionConfiguration *savedConfiguration;
+/** Convenience BOOL that checks useManualAudio and isAudioEnebled. */
+@property(readonly) BOOL canPlayOrRecord;
- (BOOL)checkLock:(NSError **)outError;
@@ -55,6 +52,22 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (BOOL)endWebRTCSession:(NSError **)outError;
+/** Configure the audio session for WebRTC. This call will fail if the session
+ * is already configured. On other failures, we will attempt to restore the
+ * previously used audio session configuration.
+ * |lockForConfiguration| must be called first.
+ * Successful calls to configureWebRTCSession must be matched by calls to
+ * |unconfigureWebRTCSession|.
+ */
+- (BOOL)configureWebRTCSession:(NSError **)outError;
+
+/** Unconfigures the session for WebRTC. This will attempt to restore the
+ * audio session to the settings used before |configureWebRTCSession| was
+ * called.
+ * |lockForConfiguration| must be called first.
+ */
+- (BOOL)unconfigureWebRTCSession:(NSError **)outError;
+
/** Returns a configuration error with the given description. */
- (NSError *)configurationErrorWithDescription:(NSString *)description;
@@ -69,10 +82,9 @@ NS_ASSUME_NONNULL_BEGIN
previousRoute:(AVAudioSessionRouteDescription *)previousRoute;
- (void)notifyMediaServicesWereLost;
- (void)notifyMediaServicesWereReset;
-- (void)notifyShouldConfigure;
-- (void)notifyShouldUnconfigure;
-- (void)notifyDidConfigure;
-- (void)notifyDidUnconfigure;
+- (void)notifyDidChangeCanPlayOrRecord:(BOOL)canPlayOrRecord;
+- (void)notifyDidStartPlayOrRecord;
+- (void)notifyDidStopPlayOrRecord;
@end

Powered by Google App Engine
This is Rietveld 408576698