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

Unified Diff: media/audio/linux/alsa_output.cc

Issue 17315021: Refactored DataBuffer to use unix_hacker style methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Inlined getters and setters on DataBuffer Created 7 years, 6 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 | « no previous file | media/audio/linux/alsa_output_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/linux/alsa_output.cc
diff --git a/media/audio/linux/alsa_output.cc b/media/audio/linux/alsa_output.cc
index 905855565347ddb02a531cc31bc42243368d1718..794a417ca30f1251b9c574512d7aa20e621859b5 100644
--- a/media/audio/linux/alsa_output.cc
+++ b/media/audio/linux/alsa_output.cc
@@ -307,8 +307,8 @@ void AlsaPcmOutputStream::Start(AudioSourceCallback* callback) {
// Ensure the first buffer is silence to avoid startup glitches.
int buffer_size = GetAvailableFrames() * bytes_per_output_frame_;
scoped_refptr<DataBuffer> silent_packet = new DataBuffer(buffer_size);
- silent_packet->SetDataSize(buffer_size);
- memset(silent_packet->GetWritableData(), 0, silent_packet->GetDataSize());
+ silent_packet->set_data_size(buffer_size);
+ memset(silent_packet->writable_data(), 0, silent_packet->data_size());
buffer_->Append(silent_packet);
WritePacket();
@@ -380,10 +380,10 @@ void AlsaPcmOutputStream::BufferPacket(bool* source_exhausted) {
// and sanitized since it may come from an untrusted source such as NaCl.
output_bus->Scale(volume_);
output_bus->ToInterleaved(
- frames_filled, bytes_per_sample_, packet->GetWritableData());
+ frames_filled, bytes_per_sample_, packet->writable_data());
if (packet_size > 0) {
- packet->SetDataSize(packet_size);
+ packet->set_data_size(packet_size);
// Add the packet to the buffer.
buffer_->Append(packet);
} else {
« no previous file with comments | « no previous file | media/audio/linux/alsa_output_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698