| 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_VIRTUAL_AUDIO_INPUT_STREAM_H_ | 5 #ifndef MEDIA_AUDIO_VIRTUAL_AUDIO_INPUT_STREAM_H_ |
| 6 #define MEDIA_AUDIO_VIRTUAL_AUDIO_INPUT_STREAM_H_ | 6 #define MEDIA_AUDIO_VIRTUAL_AUDIO_INPUT_STREAM_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // callback to render audio using any attached VirtualAudioOutputStreams until | 70 // callback to render audio using any attached VirtualAudioOutputStreams until |
| 71 // Stop() is called. | 71 // Stop() is called. |
| 72 void ReadAudio(); | 72 void ReadAudio(); |
| 73 | 73 |
| 74 AudioManagerBase* audio_manager_; | 74 AudioManagerBase* audio_manager_; |
| 75 base::MessageLoopProxy* message_loop_; | 75 base::MessageLoopProxy* message_loop_; |
| 76 AudioInputCallback* callback_; | 76 AudioInputCallback* callback_; |
| 77 | 77 |
| 78 // Non-const for testing. | 78 // Non-const for testing. |
| 79 base::TimeDelta buffer_duration_ms_; | 79 base::TimeDelta buffer_duration_ms_; |
| 80 base::Time next_read_time_; |
| 80 scoped_array<uint8> buffer_; | 81 scoped_array<uint8> buffer_; |
| 81 AudioParameters params_; | 82 AudioParameters params_; |
| 82 scoped_ptr<AudioBus> audio_bus_; | 83 scoped_ptr<AudioBus> audio_bus_; |
| 83 base::CancelableClosure on_more_data_cb_; | 84 base::CancelableClosure on_more_data_cb_; |
| 84 | 85 |
| 85 // AudioConverters associated with the attached VirtualAudioOutputStreams, | 86 // AudioConverters associated with the attached VirtualAudioOutputStreams, |
| 86 // partitioned by common AudioParameters. | 87 // partitioned by common AudioParameters. |
| 87 AudioConvertersMap converters_; | 88 AudioConvertersMap converters_; |
| 88 | 89 |
| 89 // AudioConverter that takes all the audio converters and mixes them into one | 90 // AudioConverter that takes all the audio converters and mixes them into one |
| 90 // final audio stream. | 91 // final audio stream. |
| 91 AudioConverter mixer_; | 92 AudioConverter mixer_; |
| 92 | 93 |
| 93 // Number of currently attached VirtualAudioOutputStreams. | 94 // Number of currently attached VirtualAudioOutputStreams. |
| 94 int num_attached_outputs_streams_; | 95 int num_attached_outputs_streams_; |
| 95 | 96 |
| 96 DISALLOW_COPY_AND_ASSIGN(VirtualAudioInputStream); | 97 DISALLOW_COPY_AND_ASSIGN(VirtualAudioInputStream); |
| 97 }; | 98 }; |
| 98 | 99 |
| 99 } // namespace media | 100 } // namespace media |
| 100 | 101 |
| 101 #endif // MEDIA_AUDIO_VIRTUAL_AUDIO_INPUT_STREAM_H_ | 102 #endif // MEDIA_AUDIO_VIRTUAL_AUDIO_INPUT_STREAM_H_ |
| OLD | NEW |