| 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 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ |
| 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ | 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // TODO(dalecurtis): Ideally the low latency path will be as reliable as the | 34 // TODO(dalecurtis): Ideally the low latency path will be as reliable as the |
| 35 // high latency path once we have channel mixing and support querying for the | 35 // high latency path once we have channel mixing and support querying for the |
| 36 // hardware's configured bit depth. Monitor the UMA stats for fallback and | 36 // hardware's configured bit depth. Monitor the UMA stats for fallback and |
| 37 // remove fallback support once it's stable. http://crbug.com/148418 | 37 // remove fallback support once it's stable. http://crbug.com/148418 |
| 38 class MEDIA_EXPORT AudioOutputResampler : public AudioOutputDispatcher { | 38 class MEDIA_EXPORT AudioOutputResampler : public AudioOutputDispatcher { |
| 39 public: | 39 public: |
| 40 AudioOutputResampler(AudioManager* audio_manager, | 40 AudioOutputResampler(AudioManager* audio_manager, |
| 41 const AudioParameters& input_params, | 41 const AudioParameters& input_params, |
| 42 const AudioParameters& output_params, | 42 const AudioParameters& output_params, |
| 43 const std::string& output_device_id, | 43 const std::string& output_device_id, |
| 44 const std::string& input_device_id, | |
| 45 const base::TimeDelta& close_delay); | 44 const base::TimeDelta& close_delay); |
| 46 | 45 |
| 47 // AudioOutputDispatcher interface. | 46 // AudioOutputDispatcher interface. |
| 48 virtual bool OpenStream() OVERRIDE; | 47 virtual bool OpenStream() OVERRIDE; |
| 49 virtual bool StartStream(AudioOutputStream::AudioSourceCallback* callback, | 48 virtual bool StartStream(AudioOutputStream::AudioSourceCallback* callback, |
| 50 AudioOutputProxy* stream_proxy) OVERRIDE; | 49 AudioOutputProxy* stream_proxy) OVERRIDE; |
| 51 virtual void StopStream(AudioOutputProxy* stream_proxy) OVERRIDE; | 50 virtual void StopStream(AudioOutputProxy* stream_proxy) OVERRIDE; |
| 52 virtual void StreamVolumeSet(AudioOutputProxy* stream_proxy, | 51 virtual void StreamVolumeSet(AudioOutputProxy* stream_proxy, |
| 53 double volume) OVERRIDE; | 52 double volume) OVERRIDE; |
| 54 virtual void CloseStream(AudioOutputProxy* stream_proxy) OVERRIDE; | 53 virtual void CloseStream(AudioOutputProxy* stream_proxy) OVERRIDE; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 84 // Whether any streams have been opened through |dispatcher_|, if so we can't | 83 // Whether any streams have been opened through |dispatcher_|, if so we can't |
| 85 // fallback on future OpenStream() failures. | 84 // fallback on future OpenStream() failures. |
| 86 bool streams_opened_; | 85 bool streams_opened_; |
| 87 | 86 |
| 88 DISALLOW_COPY_AND_ASSIGN(AudioOutputResampler); | 87 DISALLOW_COPY_AND_ASSIGN(AudioOutputResampler); |
| 89 }; | 88 }; |
| 90 | 89 |
| 91 } // namespace media | 90 } // namespace media |
| 92 | 91 |
| 93 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ | 92 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ |
| OLD | NEW |