| 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..88730016d698d557035727b32a855584a4f2b34f
|
| --- /dev/null
|
| +++ b/components/copresence/test/audio_test_support.h
|
| @@ -0,0 +1,33 @@
|
| +// 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 channels, int samples);
|
| +
|
| +// Create an ref counted audio bus populated with random samples.
|
| +scoped_refptr<media::AudioBusRefCounted> CreateRandomAudioRefCounted(
|
| + int channels,
|
| + int samples);
|
| +
|
| +} // namespace copresence
|
| +
|
| +#endif // COMPONENTS_COPRESENCE_COMMON_AUDIO_TEST_SUPPORT_
|
|
|