| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 // AudioOutputDispatcher interface. | 47 // AudioOutputDispatcher interface. |
| 48 virtual bool OpenStream() OVERRIDE; | 48 virtual bool OpenStream() OVERRIDE; |
| 49 virtual bool StartStream(AudioOutputStream::AudioSourceCallback* callback, | 49 virtual bool StartStream(AudioOutputStream::AudioSourceCallback* callback, |
| 50 AudioOutputProxy* stream_proxy) OVERRIDE; | 50 AudioOutputProxy* stream_proxy) OVERRIDE; |
| 51 virtual void StopStream(AudioOutputProxy* stream_proxy) OVERRIDE; | 51 virtual void StopStream(AudioOutputProxy* stream_proxy) OVERRIDE; |
| 52 virtual void StreamVolumeSet(AudioOutputProxy* stream_proxy, | 52 virtual void StreamVolumeSet(AudioOutputProxy* stream_proxy, |
| 53 double volume) OVERRIDE; | 53 double volume) OVERRIDE; |
| 54 virtual void CloseStream(AudioOutputProxy* stream_proxy) OVERRIDE; | 54 virtual void CloseStream(AudioOutputProxy* stream_proxy) OVERRIDE; |
| 55 virtual void Shutdown() OVERRIDE; | 55 virtual void Shutdown() OVERRIDE; |
| 56 virtual void CloseStreamsForWedgeFix() OVERRIDE; |
| 57 virtual void RestartStreamsForWedgeFix() OVERRIDE; |
| 56 | 58 |
| 57 private: | 59 private: |
| 58 friend class base::RefCountedThreadSafe<AudioOutputResampler>; | 60 friend class base::RefCountedThreadSafe<AudioOutputResampler>; |
| 59 virtual ~AudioOutputResampler(); | 61 virtual ~AudioOutputResampler(); |
| 60 | 62 |
| 61 // Converts low latency based output parameters into high latency | 63 // Converts low latency based output parameters into high latency |
| 62 // appropriate output parameters in error situations. | 64 // appropriate output parameters in error situations. |
| 63 void SetupFallbackParams(); | 65 void SetupFallbackParams(); |
| 64 | 66 |
| 65 // Used to initialize and reinitialize |dispatcher_|. | 67 // Used to initialize and reinitialize |dispatcher_|. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 82 // Whether any streams have been opened through |dispatcher_|, if so we can't | 84 // Whether any streams have been opened through |dispatcher_|, if so we can't |
| 83 // fallback on future OpenStream() failures. | 85 // fallback on future OpenStream() failures. |
| 84 bool streams_opened_; | 86 bool streams_opened_; |
| 85 | 87 |
| 86 DISALLOW_COPY_AND_ASSIGN(AudioOutputResampler); | 88 DISALLOW_COPY_AND_ASSIGN(AudioOutputResampler); |
| 87 }; | 89 }; |
| 88 | 90 |
| 89 } // namespace media | 91 } // namespace media |
| 90 | 92 |
| 91 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ | 93 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ |
| OLD | NEW |