Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: media/audio/linux/alsa_input.h

Issue 9655018: Make AudioParameters a class instead of a struct (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright years Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/fake_audio_output_stream.cc ('k') | media/audio/linux/alsa_input.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/linux/alsa_input.h
diff --git a/media/audio/linux/alsa_input.h b/media/audio/linux/alsa_input.h
index 5f3b4679cf76d2dc2edaf854c70d52ecfd416bf5..bbe965de030d0063fc2f1cdec02b3fdc18f93e10 100644
--- a/media/audio/linux/alsa_input.h
+++ b/media/audio/linux/alsa_input.h
@@ -51,7 +51,7 @@ class AlsaPcmInputStream : public AudioInputStream {
// Logs the error and invokes any registered callbacks.
void HandleError(const char* method, int error);
- // Reads one or more packets of audio from the device, passes on to the
+ // Reads one or more buffers of audio from the device, passes on to the
// registered callback and schedules the next read.
void ReadAudio();
@@ -69,16 +69,16 @@ class AlsaPcmInputStream : public AudioInputStream {
AudioManagerLinux* audio_manager_;
std::string device_name_;
AudioParameters params_;
- int bytes_per_packet_;
+ int bytes_per_buffer_;
AlsaWrapper* wrapper_;
- int packet_duration_ms_; // Length of each recorded packet in milliseconds.
+ int buffer_duration_ms_; // Length of each recorded buffer in milliseconds.
AudioInputCallback* callback_; // Valid during a recording session.
base::Time next_read_time_; // Scheduled time for the next read callback.
snd_pcm_t* device_handle_; // Handle to the ALSA PCM recording device.
snd_mixer_t* mixer_handle_; // Handle to the ALSA microphone mixer.
snd_mixer_elem_t* mixer_element_handle_; // Handle to the capture element.
base::WeakPtrFactory<AlsaPcmInputStream> weak_factory_;
- scoped_array<uint8> audio_packet_; // Buffer used for reading audio data.
+ scoped_array<uint8> audio_buffer_; // Buffer used for reading audio data.
bool read_callback_behind_schedule_;
DISALLOW_COPY_AND_ASSIGN(AlsaPcmInputStream);
« no previous file with comments | « media/audio/fake_audio_output_stream.cc ('k') | media/audio/linux/alsa_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698