OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 output stream based on the ALSA PCM interface. | 5 // Creates an output stream based on the ALSA PCM interface. |
6 // | 6 // |
7 // On device write failure, the stream will move itself to an invalid state. | 7 // On device write failure, the stream will move itself to an invalid state. |
8 // No more data will be pulled from the data source, or written to the device. | 8 // No more data will be pulled from the data source, or written to the device. |
9 // All calls to public API functions will either no-op themselves, or return an | 9 // All calls to public API functions will either no-op themselves, or return an |
10 // error if possible. Specifically, If the stream is in an error state, Open() | 10 // error if possible. Specifically, If the stream is in an error state, Open() |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // | 68 // |
69 // If unsure of what to use for |device_name|, use |kAutoSelectDevice|. | 69 // If unsure of what to use for |device_name|, use |kAutoSelectDevice|. |
70 AlsaPcmOutputStream(const std::string& device_name, | 70 AlsaPcmOutputStream(const std::string& device_name, |
71 const AudioParameters& params, | 71 const AudioParameters& params, |
72 AlsaWrapper* wrapper, | 72 AlsaWrapper* wrapper, |
73 AudioManagerBase* manager); | 73 AudioManagerBase* manager); |
74 | 74 |
75 virtual ~AlsaPcmOutputStream(); | 75 virtual ~AlsaPcmOutputStream(); |
76 | 76 |
77 // Implementation of AudioOutputStream. | 77 // Implementation of AudioOutputStream. |
78 virtual bool Open() OVERRIDE; | 78 virtual bool Open() override; |
79 virtual void Close() OVERRIDE; | 79 virtual void Close() override; |
80 virtual void Start(AudioSourceCallback* callback) OVERRIDE; | 80 virtual void Start(AudioSourceCallback* callback) override; |
81 virtual void Stop() OVERRIDE; | 81 virtual void Stop() override; |
82 virtual void SetVolume(double volume) OVERRIDE; | 82 virtual void SetVolume(double volume) override; |
83 virtual void GetVolume(double* volume) OVERRIDE; | 83 virtual void GetVolume(double* volume) override; |
84 | 84 |
85 private: | 85 private: |
86 friend class AlsaPcmOutputStreamTest; | 86 friend class AlsaPcmOutputStreamTest; |
87 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, | 87 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, |
88 AutoSelectDevice_DeviceSelect); | 88 AutoSelectDevice_DeviceSelect); |
89 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, | 89 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, |
90 AutoSelectDevice_FallbackDevices); | 90 AutoSelectDevice_FallbackDevices); |
91 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, AutoSelectDevice_HintFail); | 91 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, AutoSelectDevice_HintFail); |
92 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, BufferPacket); | 92 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, BufferPacket); |
93 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, BufferPacket_Negative); | 93 FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, BufferPacket_Negative); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 220 |
221 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream); | 221 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream); |
222 }; | 222 }; |
223 | 223 |
224 MEDIA_EXPORT std::ostream& operator<<(std::ostream& os, | 224 MEDIA_EXPORT std::ostream& operator<<(std::ostream& os, |
225 AlsaPcmOutputStream::InternalState); | 225 AlsaPcmOutputStream::InternalState); |
226 | 226 |
227 }; // namespace media | 227 }; // namespace media |
228 | 228 |
229 #endif // MEDIA_AUDIO_ALSA_ALSA_OUTPUT_H_ | 229 #endif // MEDIA_AUDIO_ALSA_ALSA_OUTPUT_H_ |
OLD | NEW |