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

Unified Diff: examples/audio_play_test/play_wav.cc

Issue 1694963002: Change who allocated the MediaPipe's shared buffer. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix android trybots Created 4 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 side-by-side diff with in-line comments
Download patch
Index: examples/audio_play_test/play_wav.cc
diff --git a/examples/audio_play_test/play_wav.cc b/examples/audio_play_test/play_wav.cc
index 03cb392a9ef173272dc0bdb10623299972199b84..6b892318e6bfd75a539f6d6b134cffc893828602 100644
--- a/examples/audio_play_test/play_wav.cc
+++ b/examples/audio_play_test/play_wav.cc
@@ -267,7 +267,6 @@ void PlayWAVApp::ProcessHTTPResponse(URLResponsePtr resp) {
AudioTrackConfigurationPtr cfg;
cfg = AudioTrackConfiguration::New();
- cfg->max_frames = USecToFrames(BUF_DEPTH_USEC);
cfg->audio_frame_ratio = tmp.numerator;
cfg->media_time_ratio = tmp.denominator;
@@ -296,6 +295,7 @@ void PlayWAVApp::ProcessHTTPResponse(URLResponsePtr resp) {
// Set up our media pipe helper, configure its callback and water marks to
// kick off the playback process.
audio_pipe_.reset(new CircularBufferMediaPipeAdapter(media_pipe.Pass()));
+ audio_pipe_->Init(USecToBytes(BUF_DEPTH_USEC));
audio_pipe_->SetWatermarks(USecToBytes(BUF_HI_WATER_USEC),
USecToBytes(BUF_LO_WATER_USEC));
audio_pipe_->SetSignalCallback(
« no previous file with comments | « examples/audio_play_test/play_tone.cc ('k') | mojo/dart/packages/mojo_services/lib/mojo/media/audio_track.mojom.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698