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

Unified Diff: examples/audio_play_test/play_tone.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
« no previous file with comments | « no previous file | examples/audio_play_test/play_wav.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/audio_play_test/play_tone.cc
diff --git a/examples/audio_play_test/play_tone.cc b/examples/audio_play_test/play_tone.cc
index fdc18f239b405ec6ca7910f8d5436b5e158704fa..321261b29437fb17083bf4c1e7c1a00ea745a471 100644
--- a/examples/audio_play_test/play_tone.cc
+++ b/examples/audio_play_test/play_tone.cc
@@ -121,7 +121,6 @@ void PlayToneApp::Initialize(ApplicationImpl* app) {
// Configure our sink for 16-bit 48KHz mono.
AudioTrackConfigurationPtr cfg = AudioTrackConfiguration::New();
- cfg->max_frames = USecToBytes(BUF_DEPTH_USEC) / FRAME_BYTES;
LpcmMediaTypeDetailsPtr pcm_cfg = LpcmMediaTypeDetails::New();
pcm_cfg->sample_format = LpcmSampleFormat::SIGNED_16;
@@ -140,6 +139,7 @@ void PlayToneApp::Initialize(ApplicationImpl* app) {
// proxy, pass its interface to our circular buffer helper, set up our
// high/low water marks, register our callback, and start to buffer our audio.
audio_pipe_.reset(new CircularBufferMediaPipeAdapter(pipe.Pass()));
+ audio_pipe_->Init(USecToBytes(BUF_DEPTH_USEC));
audio_pipe_->SetSignalCallback(
[this](MediaResult res) -> void {
GenerateToneCbk(res);
« no previous file with comments | « no previous file | examples/audio_play_test/play_wav.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698