OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ALSA_ALSA_INPUT_H_ | 5 #ifndef MEDIA_AUDIO_ALSA_ALSA_INPUT_H_ |
6 #define MEDIA_AUDIO_ALSA_ALSA_INPUT_H_ | 6 #define MEDIA_AUDIO_ALSA_ALSA_INPUT_H_ |
7 | 7 |
8 #include <alsa/asoundlib.h> | 8 #include <alsa/asoundlib.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 int bytes_per_buffer_; | 75 int bytes_per_buffer_; |
76 AlsaWrapper* wrapper_; | 76 AlsaWrapper* wrapper_; |
77 base::TimeDelta buffer_duration_; // Length of each recorded buffer. | 77 base::TimeDelta buffer_duration_; // Length of each recorded buffer. |
78 AudioInputCallback* callback_; // Valid during a recording session. | 78 AudioInputCallback* callback_; // Valid during a recording session. |
79 base::TimeTicks next_read_time_; // Scheduled time for next read callback. | 79 base::TimeTicks next_read_time_; // Scheduled time for next read callback. |
80 snd_pcm_t* device_handle_; // Handle to the ALSA PCM recording device. | 80 snd_pcm_t* device_handle_; // Handle to the ALSA PCM recording device. |
81 snd_mixer_t* mixer_handle_; // Handle to the ALSA microphone mixer. | 81 snd_mixer_t* mixer_handle_; // Handle to the ALSA microphone mixer. |
82 snd_mixer_elem_t* mixer_element_handle_; // Handle to the capture element. | 82 snd_mixer_elem_t* mixer_element_handle_; // Handle to the capture element. |
83 scoped_ptr<uint8[]> audio_buffer_; // Buffer used for reading audio data. | 83 scoped_ptr<uint8[]> audio_buffer_; // Buffer used for reading audio data. |
84 bool read_callback_behind_schedule_; | 84 bool read_callback_behind_schedule_; |
| 85 scoped_ptr<AudioBus> audio_bus_; |
85 | 86 |
86 // NOTE: Weak pointers must be invalidated before all other member variables. | 87 // NOTE: Weak pointers must be invalidated before all other member variables. |
87 base::WeakPtrFactory<AlsaPcmInputStream> weak_factory_; | 88 base::WeakPtrFactory<AlsaPcmInputStream> weak_factory_; |
88 | 89 |
89 DISALLOW_COPY_AND_ASSIGN(AlsaPcmInputStream); | 90 DISALLOW_COPY_AND_ASSIGN(AlsaPcmInputStream); |
90 }; | 91 }; |
91 | 92 |
92 } // namespace media | 93 } // namespace media |
93 | 94 |
94 #endif // MEDIA_AUDIO_ALSA_ALSA_INPUT_H_ | 95 #endif // MEDIA_AUDIO_ALSA_ALSA_INPUT_H_ |
OLD | NEW |