| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 28 matching lines...) Expand all Loading... |
| 39 #include "media/audio/audio_parameters.h" | 39 #include "media/audio/audio_parameters.h" |
| 40 | 40 |
| 41 namespace media { | 41 namespace media { |
| 42 class SeekableBuffer; | 42 class SeekableBuffer; |
| 43 }; // namespace media | 43 }; // namespace media |
| 44 | 44 |
| 45 class AlsaWrapper; | 45 class AlsaWrapper; |
| 46 class AudioManagerLinux; | 46 class AudioManagerLinux; |
| 47 class MessageLoop; | 47 class MessageLoop; |
| 48 | 48 |
| 49 class MEDIA_EXPORT AlsaPcmOutputStream : public AudioOutputStream { | 49 class AlsaPcmOutputStream : public AudioOutputStream { |
| 50 public: | 50 public: |
| 51 // String for the generic "default" ALSA device that has the highest | 51 // String for the generic "default" ALSA device that has the highest |
| 52 // compatibility and chance of working. | 52 // compatibility and chance of working. |
| 53 static const char kDefaultDevice[]; | 53 static const char kDefaultDevice[]; |
| 54 | 54 |
| 55 // Pass this to the AlsaPcmOutputStream if you want to attempt auto-selection | 55 // Pass this to the AlsaPcmOutputStream if you want to attempt auto-selection |
| 56 // of the audio device. | 56 // of the audio device. |
| 57 static const char kAutoSelectDevice[]; | 57 static const char kAutoSelectDevice[]; |
| 58 | 58 |
| 59 // Prefix for device names to enable ALSA library resampling. | 59 // Prefix for device names to enable ALSA library resampling. |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 ScopedRunnableMethodFactory<AlsaPcmOutputStream> method_factory_; | 212 ScopedRunnableMethodFactory<AlsaPcmOutputStream> method_factory_; |
| 213 | 213 |
| 214 InternalState state_; | 214 InternalState state_; |
| 215 float volume_; // Volume level from 0.0 to 1.0. | 215 float volume_; // Volume level from 0.0 to 1.0. |
| 216 | 216 |
| 217 AudioSourceCallback* source_callback_; | 217 AudioSourceCallback* source_callback_; |
| 218 | 218 |
| 219 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream); | 219 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream); |
| 220 }; | 220 }; |
| 221 | 221 |
| 222 MEDIA_EXPORT std::ostream& operator<<(std::ostream& os, | |
| 223 AlsaPcmOutputStream::InternalState); | |
| 224 | |
| 225 #endif // MEDIA_AUDIO_LINUX_ALSA_OUTPUT_H_ | 222 #endif // MEDIA_AUDIO_LINUX_ALSA_OUTPUT_H_ |
| OLD | NEW |