| Index: media/audio/audio_system.h
|
| diff --git a/media/audio/audio_system.h b/media/audio/audio_system.h
|
| index 76319cc2eb75aa1f84c513f030ce9f6729c9e872..de05c69aff9472f5a91975199bb110810559d1f2 100644
|
| --- a/media/audio/audio_system.h
|
| +++ b/media/audio/audio_system.h
|
| @@ -9,6 +9,10 @@
|
| #include "media/base/audio_parameters.h"
|
| #include "media/base/media_export.h"
|
|
|
| +namespace base {
|
| +class SingleThreadTaskRunner;
|
| +}
|
| +
|
| namespace media {
|
| class AudioManager;
|
|
|
| @@ -17,7 +21,9 @@ class AudioManager;
|
| // to Mojo audio service.
|
| class MEDIA_EXPORT AudioSystem {
|
| public:
|
| - // Replies are asynchronously sent to the thread the call is issued on.
|
| + // Replies are asynchronously sent from audio system thread to the thread the
|
| + // call is issued on. Attention! Since audio system thread may outlive all the
|
| + // others, callbacks must always be bound to weak pointers!
|
| using OnAudioParamsCallback = base::Callback<void(const AudioParameters&)>;
|
| using OnBoolCallback = base::Callback<void(bool)>;
|
|
|
| @@ -47,6 +53,8 @@ class MEDIA_EXPORT AudioSystem {
|
|
|
| virtual void HasInputDevices(OnBoolCallback on_has_devices_cb) const = 0;
|
|
|
| + virtual base::SingleThreadTaskRunner* GetTaskRunner() const = 0;
|
| +
|
| // Must not be used for anything but stream creation.
|
| virtual AudioManager* GetAudioManager() const = 0;
|
|
|
|
|