Mac: Fix performance issues with remote CoreAnimation
[chromium-blink-merge.git] / components / copresence / test / audio_test_support.h
blob0c66dcfd33da048807832f14314436e8fb0719f0
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_COPRESENCE_TEST_AUDIO_TEST_SUPPORT_
6 #define COMPONENTS_COPRESENCE_TEST_AUDIO_TEST_SUPPORT_
8 #include <cstddef>
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
13 namespace media {
14 class AudioBus;
15 class AudioBusRefCounted;
18 namespace copresence {
20 // Populate random samples given a random seed into the samples array.
21 void PopulateSamples(int random_seed, size_t size, float* samples);
23 // Create an audio bus populated with random samples.
24 scoped_ptr<media::AudioBus> CreateRandomAudio(int random_seed,
25 int channels,
26 int samples);
28 // Create an ref counted audio bus populated with random samples.
29 scoped_refptr<media::AudioBusRefCounted>
30 CreateRandomAudioRefCounted(int random_seed, int channels, int samples);
32 } // namespace copresence
34 #endif // COMPONENTS_COPRESENCE_TEST_AUDIO_TEST_SUPPORT_