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

Side by Side Diff: media/base/audio_buffer.cc

Issue 891773003: media:AudioBuffer : Add missing break statement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "media/base/audio_buffer.h" 5 #include "media/base/audio_buffer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/base/audio_bus.h" 8 #include "media/base/audio_bus.h"
9 #include "media/base/buffers.h" 9 #include "media/base/buffers.h"
10 #include "media/base/limits.h" 10 #include "media/base/limits.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 ConvertF32ToS32); 330 ConvertF32ToS32);
331 break; 331 break;
332 case kSampleFormatPlanarS32: 332 case kSampleFormatPlanarS32:
333 // Format is planar signed 32 bit. Convert each value into int32 and 333 // Format is planar signed 32 bit. Convert each value into int32 and
334 // insert into output channel data. 334 // insert into output channel data.
335 InterleaveToS32<int32>(channel_data_, 335 InterleaveToS32<int32>(channel_data_,
336 frames_to_copy, 336 frames_to_copy,
337 trim_start_, 337 trim_start_,
338 dest_data, 338 dest_data,
339 ConvertS32ToS32); 339 ConvertS32ToS32);
340 break;
340 case kUnknownSampleFormat: 341 case kUnknownSampleFormat:
341 NOTREACHED(); 342 NOTREACHED();
342 break; 343 break;
343 } 344 }
344 } 345 }
345 346
346 void AudioBuffer::TrimStart(int frames_to_trim) { 347 void AudioBuffer::TrimStart(int frames_to_trim) {
347 CHECK_GE(frames_to_trim, 0); 348 CHECK_GE(frames_to_trim, 0);
348 CHECK_LE(frames_to_trim, adjusted_frame_count_); 349 CHECK_LE(frames_to_trim, adjusted_frame_count_);
349 350
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 } 405 }
405 } else { 406 } else {
406 CHECK_EQ(frames_to_copy, 0); 407 CHECK_EQ(frames_to_copy, 0);
407 } 408 }
408 409
409 // Trim the leftover data off the end of the buffer and update duration. 410 // Trim the leftover data off the end of the buffer and update duration.
410 TrimEnd(frames_to_trim); 411 TrimEnd(frames_to_trim);
411 } 412 }
412 413
413 } // namespace media 414 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698