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

Unified Diff: media/audio/ios/audio_manager_ios.h

Issue 10907110: Create iOS Audio Manager implementation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Response to review Created 8 years, 3 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
« no previous file with comments | « no previous file | media/audio/ios/audio_manager_ios.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/ios/audio_manager_ios.h
diff --git a/media/audio/ios/audio_manager_ios.h b/media/audio/ios/audio_manager_ios.h
new file mode 100644
index 0000000000000000000000000000000000000000..55cbe6ebf753c37080fe5f20501705e88a448d99
--- /dev/null
+++ b/media/audio/ios/audio_manager_ios.h
@@ -0,0 +1,55 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_AUDIO_IOS_AUDIO_MANAGER_IOS_H_
+#define MEDIA_AUDIO_IOS_AUDIO_MANAGER_IOS_H_
+
+#include "base/basictypes.h"
+#include "media/audio/audio_manager_base.h"
+
+namespace media {
+
+class PCMQueueInAudioInputStream;
+class PCMQueueOutAudioOutputStream;
+
+// iOS implementation of the AudioManager singleton. Supports only audio input.
+class MEDIA_EXPORT AudioManagerIOS : public AudioManagerBase {
+ public:
+ AudioManagerIOS();
+
+ // Implementation of AudioManager.
+ virtual bool HasAudioOutputDevices() OVERRIDE;
+ virtual bool HasAudioInputDevices() OVERRIDE;
+ virtual AudioOutputStream* MakeAudioOutputStream(
+ const AudioParameters& params) OVERRIDE;
+ virtual AudioInputStream* MakeAudioInputStream(
+ const AudioParameters& params, const std::string& device_id) OVERRIDE;
+
+ // Implementation of AudioManagerBase.
+ virtual AudioOutputStream* MakeLinearOutputStream(
+ const AudioParameters& params) OVERRIDE;
+ virtual AudioOutputStream* MakeLowLatencyOutputStream(
+ const AudioParameters& params) OVERRIDE;
+ virtual AudioInputStream* MakeLinearInputStream(
+ const AudioParameters& params, const std::string& device_id) OVERRIDE;
+ virtual AudioInputStream* MakeLowLatencyInputStream(
+ const AudioParameters& params, const std::string& device_id) OVERRIDE;
+ virtual void ReleaseOutputStream(AudioOutputStream* stream) OVERRIDE;
+ virtual void ReleaseInputStream(AudioInputStream* stream) OVERRIDE;
+
+ protected:
+ virtual ~AudioManagerIOS();
+
+ private:
+ // Initializes the audio session if necessary. Safe to call multiple times.
+ // Returns a bool indicating whether the audio session has been successfully
+ // initialized (either in the current call or in a previous call).
+ bool InitAudioSession();
+
+ DISALLOW_COPY_AND_ASSIGN(AudioManagerIOS);
+};
+
+} // namespace media
+
+#endif // MEDIA_AUDIO_IOS_AUDIO_MANAGER_IOS_H_
« no previous file with comments | « no previous file | media/audio/ios/audio_manager_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698