| 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 // Creates an audio output stream based on the PulseAudio asynchronous API; | 5 // Creates an audio output stream based on the PulseAudio asynchronous API; |
| 6 // specifically using the pa_threaded_mainloop model. | 6 // specifically using the pa_threaded_mainloop model. |
| 7 // | 7 // |
| 8 // If the stream is successfully opened, Close() must be called before the | 8 // If the stream is successfully opened, Close() must be called before the |
| 9 // stream is deleted as Close() is responsible for ensuring resource cleanup | 9 // stream is deleted as Close() is responsible for ensuring resource cleanup |
| 10 // occurs. | 10 // occurs. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 #include <memory> | 25 #include <memory> |
| 26 #include <string> | 26 #include <string> |
| 27 | 27 |
| 28 #include "base/macros.h" | 28 #include "base/macros.h" |
| 29 #include "base/threading/thread_checker.h" | 29 #include "base/threading/thread_checker.h" |
| 30 #include "media/audio/audio_io.h" | 30 #include "media/audio/audio_io.h" |
| 31 #include "media/base/audio_parameters.h" | 31 #include "media/base/audio_parameters.h" |
| 32 | 32 |
| 33 struct pa_context; | 33 struct pa_context; |
| 34 struct pa_operation; | |
| 35 struct pa_stream; | 34 struct pa_stream; |
| 36 struct pa_threaded_mainloop; | 35 struct pa_threaded_mainloop; |
| 37 | 36 |
| 38 namespace media { | 37 namespace media { |
| 39 class AudioManagerBase; | 38 class AudioManagerBase; |
| 40 | 39 |
| 41 class PulseAudioOutputStream : public AudioOutputStream { | 40 class PulseAudioOutputStream : public AudioOutputStream { |
| 42 public: | 41 public: |
| 43 PulseAudioOutputStream(const AudioParameters& params, | 42 PulseAudioOutputStream(const AudioParameters& params, |
| 44 const std::string& device_id, | 43 const std::string& device_id, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 std::unique_ptr<AudioBus> audio_bus_; | 94 std::unique_ptr<AudioBus> audio_bus_; |
| 96 | 95 |
| 97 base::ThreadChecker thread_checker_; | 96 base::ThreadChecker thread_checker_; |
| 98 | 97 |
| 99 DISALLOW_COPY_AND_ASSIGN(PulseAudioOutputStream); | 98 DISALLOW_COPY_AND_ASSIGN(PulseAudioOutputStream); |
| 100 }; | 99 }; |
| 101 | 100 |
| 102 } // namespace media | 101 } // namespace media |
| 103 | 102 |
| 104 #endif // MEDIA_AUDIO_PULSE_PULSE_OUTPUT_H_ | 103 #endif // MEDIA_AUDIO_PULSE_PULSE_OUTPUT_H_ |
| OLD | NEW |