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

Side by Side Diff: media/audio/audio_output_resampler.cc

Issue 2718903003: Add play test.
Patch Set: updated.. Created 3 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 unified diff | Download patch
« no previous file with comments | « media/audio/BUILD.gn ('k') | media/audio/mac/audio_auhal_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "media/audio/audio_output_resampler.h" 5 #include "media/audio/audio_output_resampler.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 DLOG(ERROR) << "Unable to open audio device in low latency mode. Falling " 320 DLOG(ERROR) << "Unable to open audio device in low latency mode. Falling "
321 << "back to high latency audio output."; 321 << "back to high latency audio output.";
322 322
323 SetupFallbackParams(); 323 SetupFallbackParams();
324 if (dispatcher_->OpenStream()) { 324 if (dispatcher_->OpenStream()) {
325 streams_opened_ = true; 325 streams_opened_ = true;
326 return true; 326 return true;
327 } 327 }
328 #endif 328 #endif
329 329
330 DLOG(ERROR) << "Unable to open audio device in high latency mode. Falling " 330 LOG(ERROR) << "Unable to open audio device in high latency mode. Falling "
331 << "back to fake audio output."; 331 << "back to fake audio output.";
332 332
333 // Finally fall back to a fake audio output device. 333 // Finally fall back to a fake audio output device.
334 output_params_ = params_; 334 output_params_ = params_;
335 output_params_.set_format(AudioParameters::AUDIO_FAKE); 335 output_params_.set_format(AudioParameters::AUDIO_FAKE);
336 336
337 Initialize(); 337 Initialize();
338 if (dispatcher_->OpenStream()) { 338 if (dispatcher_->OpenStream()) {
339 streams_opened_ = true; 339 streams_opened_ = true;
340 return true; 340 return true;
341 } 341 }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 dest->ZeroFramesPartial(frames, dest->frames() - frames); 495 dest->ZeroFramesPartial(frames, dest->frames() - frames);
496 return frames > 0 ? 1 : 0; 496 return frames > 0 ? 1 : 0;
497 } 497 }
498 498
499 void OnMoreDataConverter::OnError(AudioOutputStream* stream) { 499 void OnMoreDataConverter::OnError(AudioOutputStream* stream) {
500 error_occurred_ = true; 500 error_occurred_ = true;
501 source_callback_->OnError(stream); 501 source_callback_->OnError(stream);
502 } 502 }
503 503
504 } // namespace media 504 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/BUILD.gn ('k') | media/audio/mac/audio_auhal_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698