| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Implementation of AudioInputStream for Windows using Windows Core Audio | 5 // Implementation of AudioInputStream for Windows using Windows Core Audio |
| 6 // WASAPI for low latency capturing. | 6 // WASAPI for low latency capturing. |
| 7 // | 7 // |
| 8 // Overview of operation: | 8 // Overview of operation: |
| 9 // | 9 // |
| 10 // - An object of WASAPIAudioInputStream is created by the AudioManager | 10 // - An object of WASAPIAudioInputStream is created by the AudioManager |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 virtual ~WASAPIAudioInputStream(); | 95 virtual ~WASAPIAudioInputStream(); |
| 96 | 96 |
| 97 // Implementation of AudioInputStream. | 97 // Implementation of AudioInputStream. |
| 98 virtual bool Open() override; | 98 virtual bool Open() override; |
| 99 virtual void Start(AudioInputCallback* callback) override; | 99 virtual void Start(AudioInputCallback* callback) override; |
| 100 virtual void Stop() override; | 100 virtual void Stop() override; |
| 101 virtual void Close() override; | 101 virtual void Close() override; |
| 102 virtual double GetMaxVolume() override; | 102 virtual double GetMaxVolume() override; |
| 103 virtual void SetVolume(double volume) override; | 103 virtual void SetVolume(double volume) override; |
| 104 virtual double GetVolume() override; | 104 virtual double GetVolume() override; |
| 105 virtual bool IsMuted() override; |
| 105 | 106 |
| 106 bool started() const { return started_; } | 107 bool started() const { return started_; } |
| 107 | 108 |
| 108 // Returns the default hardware audio parameters of the specific device. | 109 // Returns the default hardware audio parameters of the specific device. |
| 109 static AudioParameters GetInputStreamParameters(const std::string& device_id); | 110 static AudioParameters GetInputStreamParameters(const std::string& device_id); |
| 110 | 111 |
| 111 private: | 112 private: |
| 112 // DelegateSimpleThread::Delegate implementation. | 113 // DelegateSimpleThread::Delegate implementation. |
| 113 virtual void Run() override; | 114 virtual void Run() override; |
| 114 | 115 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 // Extra audio bus used for storage of deinterleaved data for the OnData | 218 // Extra audio bus used for storage of deinterleaved data for the OnData |
| 218 // callback. | 219 // callback. |
| 219 scoped_ptr<media::AudioBus> audio_bus_; | 220 scoped_ptr<media::AudioBus> audio_bus_; |
| 220 | 221 |
| 221 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream); | 222 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream); |
| 222 }; | 223 }; |
| 223 | 224 |
| 224 } // namespace media | 225 } // namespace media |
| 225 | 226 |
| 226 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ | 227 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ |
| OLD | NEW |