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

Side by Side Diff: media/audio/audio_system.h

Issue 2675713002: Switch Speech Recognition to asynchronous callback-based AudioManager interactions. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_AUDIO_AUDIO_SYSTEM_H_
6 #define MEDIA_AUDIO_AUDIO_SYSTEM_H_
7
8 #include "base/callback.h"
9 #include "media/audio/audio_device_description.h"
10 #include "media/base/audio_parameters.h"
11 #include "media/base/media_export.h"
12
13 namespace media {
14 class AudioManager;
15
16 // Work in progress: Provides asynchronous interface to AudioManager. All the
17 // AudioManager clients will be switched to it, in preparation for moving
18 // to Mojo audio service.
19 class MEDIA_EXPORT AudioSystem {
tommi (sloooow) - chröme 2017/02/02 16:27:18 I feel that adding a new class at the same level a
o1ka 2017/02/02 16:32:22 This is a staged switch to Mojo audio service (see
20 public:
21 // Replies are asynchronously sent to the thread the call is issued on.
22 using OnAudioParamsCallback = base::Callback<void(const AudioParameters&)>;
23
24 virtual base::SingleThreadTaskRunner* GetTaskRunner() const = 0;
25
26 // Callback will receive invalid parameters if the device is not found.
27 virtual void GetInputStreamParameters(const std::string& device_id,
28 OnAudioParamsCallback on_params_cb) = 0;
29
30 // Must not be used for anything but stream creation.
31 virtual AudioManager* GetAudioManager() = 0;
32 };
33
34 } // namespace media
35
36 #endif // MEDIA_AUDIO_AUDIO_SYSTEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698