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

Unified Diff: components/copresence/test/audio_test_support.h

Issue 419073002: Add the copresence DirectiveHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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: components/copresence/test/audio_test_support.h
diff --git a/components/copresence/test/audio_test_support.h b/components/copresence/test/audio_test_support.h
new file mode 100644
index 0000000000000000000000000000000000000000..83b96f4a30ce71213579114efda647ad188603f7
--- /dev/null
+++ b/components/copresence/test/audio_test_support.h
@@ -0,0 +1,34 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_COPRESENCE_COMMON_AUDIO_TEST_SUPPORT_
+#define COMPONENTS_COPRESENCE_COMMON_AUDIO_TEST_SUPPORT_
+
+#include <cstddef>
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace media {
+class AudioBus;
+class AudioBusRefCounted;
+}
+
+namespace copresence {
+
+// Populate random samples given a random seed into the samples array.
+void PopulateSamples(int random_seed, size_t size, float* samples);
+
+// Create an audio bus populated with random samples.
+scoped_ptr<media::AudioBus> CreateRandomAudio(int random_seed,
+ int channels,
+ int samples);
+
+// Create an ref counted audio bus populated with random samples.
+scoped_refptr<media::AudioBusRefCounted>
+ CreateRandomAudioRefCounted(int random_seed, int channels, int samples);
+
+} // namespace copresence
+
+#endif // COMPONENTS_COPRESENCE_COMMON_AUDIO_TEST_SUPPORT_
« no previous file with comments | « components/copresence/public/copresence_constants.h ('k') | components/copresence/test/audio_test_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698