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