| OLD | NEW |
| 1 // Copyright (c) 2011 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 // | 6 // |
| 7 // If the stream is successfully opened, Close() must be called before the | 7 // If the stream is successfully opened, Close() must be called before the |
| 8 // stream is deleted as Close() is responsible for ensuring resource cleanup | 8 // stream is deleted as Close() is responsible for ensuring resource cleanup |
| 9 // occurs. | 9 // occurs. |
| 10 // | 10 // |
| 11 // This object is designed so that all AudioOutputStream methods will be called | 11 // This object is designed so that all AudioOutputStream methods will be called |
| (...skipping 21 matching lines...) Expand all Loading... |
| 33 #if defined(OS_LINUX) | 33 #if defined(OS_LINUX) |
| 34 class AudioManagerLinux; | 34 class AudioManagerLinux; |
| 35 typedef AudioManagerLinux AudioManagerPulse; | 35 typedef AudioManagerLinux AudioManagerPulse; |
| 36 #elif defined(OS_OPENBSD) | 36 #elif defined(OS_OPENBSD) |
| 37 class AudioManagerOpenBSD; | 37 class AudioManagerOpenBSD; |
| 38 typedef AudioManagerOpenBSD AudioManagerPulse; | 38 typedef AudioManagerOpenBSD AudioManagerPulse; |
| 39 #else | 39 #else |
| 40 #error Unsupported platform | 40 #error Unsupported platform |
| 41 #endif | 41 #endif |
| 42 | 42 |
| 43 struct AudioParameters; | 43 class AudioParameters; |
| 44 | 44 |
| 45 class PulseAudioOutputStream : public AudioOutputStream { | 45 class PulseAudioOutputStream : public AudioOutputStream { |
| 46 public: | 46 public: |
| 47 PulseAudioOutputStream(const AudioParameters& params, | 47 PulseAudioOutputStream(const AudioParameters& params, |
| 48 AudioManagerPulse* manager); | 48 AudioManagerPulse* manager); |
| 49 | 49 |
| 50 virtual ~PulseAudioOutputStream(); | 50 virtual ~PulseAudioOutputStream(); |
| 51 | 51 |
| 52 // Implementation of AudioOutputStream. | 52 // Implementation of AudioOutputStream. |
| 53 virtual bool Open(); | 53 virtual bool Open(); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // bound by its lifetime. | 124 // bound by its lifetime. |
| 125 base::WeakPtrFactory<PulseAudioOutputStream> weak_factory_; | 125 base::WeakPtrFactory<PulseAudioOutputStream> weak_factory_; |
| 126 | 126 |
| 127 // Callback to audio data source. | 127 // Callback to audio data source. |
| 128 AudioSourceCallback* source_callback_; | 128 AudioSourceCallback* source_callback_; |
| 129 | 129 |
| 130 DISALLOW_COPY_AND_ASSIGN(PulseAudioOutputStream); | 130 DISALLOW_COPY_AND_ASSIGN(PulseAudioOutputStream); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 #endif // MEDIA_AUDIO_PULSE_PULSE_OUTPUT_H_ | 133 #endif // MEDIA_AUDIO_PULSE_PULSE_OUTPUT_H_ |
| OLD | NEW |