| 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 // Used to initialize and reinitialize |dispatcher_|. | 63 // Used to initialize and reinitialize |dispatcher_|. |
| 62 void Initialize(); | 64 void Initialize(); |
| 63 | 65 |
| 64 // Dispatcher to proxy all AudioOutputDispatcher calls too. | 66 // Dispatcher to proxy all AudioOutputDispatcher calls too. |
| 65 scoped_refptr<AudioOutputDispatcher> dispatcher_; | 67 scoped_refptr<AudioOutputDispatcher> dispatcher_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 78 // Whether any streams have been opened through |dispatcher_|, if so we can't | 80 // Whether any streams have been opened through |dispatcher_|, if so we can't |
| 79 // fallback on future OpenStream() failures. | 81 // fallback on future OpenStream() failures. |
| 80 bool streams_opened_; | 82 bool streams_opened_; |
| 81 | 83 |
| 82 DISALLOW_COPY_AND_ASSIGN(AudioOutputResampler); | 84 DISALLOW_COPY_AND_ASSIGN(AudioOutputResampler); |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 } // namespace media | 87 } // namespace media |
| 86 | 88 |
| 87 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ | 89 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ |
| OLD | NEW |