| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROMECAST_PUBLIC_MEDIA_AUDIO_PIPELINE_DEVICE_H_ | 5 #ifndef CHROMECAST_MEDIA_CMA_ADAPTER_AUDIO_PIPELINE_DEVICE_H_ |
| 6 #define CHROMECAST_PUBLIC_MEDIA_AUDIO_PIPELINE_DEVICE_H_ | 6 #define CHROMECAST_MEDIA_CMA_ADAPTER_AUDIO_PIPELINE_DEVICE_H_ |
| 7 | 7 |
| 8 #include "media_component_device.h" | 8 #include "media_component_device.h" |
| 9 | 9 |
| 10 namespace chromecast { | 10 namespace chromecast { |
| 11 namespace media { | 11 namespace media { |
| 12 class AudioPipelineDeviceClient; | 12 class AudioPipelineDeviceClient; |
| 13 struct AudioConfig; | 13 struct AudioConfig; |
| 14 | 14 |
| 15 // Interface for platform-specific audio pipeline backend. | 15 // Interface for platform-specific audio pipeline backend. |
| 16 // See comments on MediaComponentDevice. | 16 // See comments on MediaComponentDevice. |
| 17 class AudioPipelineDevice : public MediaComponentDevice { | 17 class AudioPipelineDevice : public MediaComponentDevice { |
| 18 public: | 18 public: |
| 19 ~AudioPipelineDevice() override {} | 19 ~AudioPipelineDevice() override {} |
| 20 | 20 |
| 21 // Provides the audio configuration. | 21 // Provides the audio configuration. |
| 22 // Will be called before switching from |kStateUninitialized| to |kStateIdle|. | 22 // Will be called before switching from |kStateUninitialized| to |kStateIdle|. |
| 23 // Afterwards, this can be invoked any time the configuration changes. | 23 // Afterwards, this can be invoked any time the configuration changes. |
| 24 // Returns true if the configuration is a supported configuration. | 24 // Returns true if the configuration is a supported configuration. |
| 25 virtual bool SetConfig(const AudioConfig& config) = 0; | 25 virtual bool SetConfig(const AudioConfig& config) = 0; |
| 26 | 26 |
| 27 // Sets the volume multiplier. | 27 // Sets the volume multiplier. |
| 28 // The multiplier is in the range [0.0, 1.0]. | 28 // The multiplier is in the range [0.0, 1.0]. |
| 29 virtual void SetStreamVolumeMultiplier(float multiplier) = 0; | 29 virtual void SetStreamVolumeMultiplier(float multiplier) = 0; |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 } // namespace media | 32 } // namespace media |
| 33 } // namespace chromecast | 33 } // namespace chromecast |
| 34 | 34 |
| 35 #endif // CHROMECAST_MEDIA_CMA_BACKEND_AUDIO_PIPELINE_DEVICE_H_ | 35 #endif // CHROMECAST_MEDIA_CMA_ADAPTER_AUDIO_PIPELINE_DEVICE_H_ |
| OLD | NEW |