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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 virtual ~AudioOutputResampler(); | 75 virtual ~AudioOutputResampler(); |
76 | 76 |
77 // Used to initialize the FIFO and resamplers. | 77 // Used to initialize the FIFO and resamplers. |
78 void Initialize(); | 78 void Initialize(); |
79 | 79 |
80 // Called by MultiChannelResampler when more data is necessary. | 80 // Called by MultiChannelResampler when more data is necessary. |
81 void ProvideInput(AudioBus* audio_bus); | 81 void ProvideInput(AudioBus* audio_bus); |
82 | 82 |
83 // Called by AudioPullFifo when more data is necessary. Requires | 83 // Called by AudioPullFifo when more data is necessary. Requires |
84 // |source_lock_| to have been acquired. | 84 // |source_lock_| to have been acquired. |
85 void SourceCallback_Locked(AudioBus* audio_bus); | 85 void SourceCallback_Locked(AudioBus* dest); |
| 86 |
| 87 // Passes through |source| to the |source_callback_| OnMoreIOData() call. |
| 88 void SourceIOCallback_Locked(AudioBus* source, AudioBus* dest); |
86 | 89 |
87 // Used by StopStream()/CloseStream()/Shutdown() to clear internal state. | 90 // Used by StopStream()/CloseStream()/Shutdown() to clear internal state. |
88 // TODO(dalecurtis): Probably only one of these methods needs to call this, | 91 // TODO(dalecurtis): Probably only one of these methods needs to call this, |
89 // the rest should DCHECK()/CHECK() that the values were reset. | 92 // the rest should DCHECK()/CHECK() that the values were reset. |
90 void Reset(); | 93 void Reset(); |
91 | 94 |
92 // Handles resampling. | 95 // Handles resampling. |
93 scoped_ptr<MultiChannelResampler> resampler_; | 96 scoped_ptr<MultiChannelResampler> resampler_; |
94 | 97 |
95 // Dispatcher to proxy all AudioOutputDispatcher calls too. | 98 // Dispatcher to proxy all AudioOutputDispatcher calls too. |
(...skipping 26 matching lines...) Expand all Loading... |
122 | 125 |
123 // AudioParameters used to setup the output stream. | 126 // AudioParameters used to setup the output stream. |
124 AudioParameters output_params_; | 127 AudioParameters output_params_; |
125 | 128 |
126 DISALLOW_COPY_AND_ASSIGN(AudioOutputResampler); | 129 DISALLOW_COPY_AND_ASSIGN(AudioOutputResampler); |
127 }; | 130 }; |
128 | 131 |
129 } // namespace media | 132 } // namespace media |
130 | 133 |
131 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ | 134 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ |
OLD | NEW |