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

Side by Side Diff: components/copresence/test/audio_test_support.h

Issue 901753002: Cleaning up some tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using rand() instead of rand_r() on Windows Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_COPRESENCE_TEST_AUDIO_TEST_SUPPORT_ 5 #ifndef COMPONENTS_COPRESENCE_TEST_AUDIO_TEST_SUPPORT_H_
6 #define COMPONENTS_COPRESENCE_TEST_AUDIO_TEST_SUPPORT_ 6 #define COMPONENTS_COPRESENCE_TEST_AUDIO_TEST_SUPPORT_H_
7 7
8 #include <cstddef> 8 #include <cstddef>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 12
13 namespace media { 13 namespace media {
14 class AudioBus; 14 class AudioBus;
15 class AudioBusRefCounted; 15 class AudioBusRefCounted;
16 } 16 }
17 17
18 namespace copresence { 18 namespace copresence {
19 19
20 // Populate random samples given a random seed into the samples array. 20 // Populate random samples given a random seed into the samples array.
21 void PopulateSamples(int random_seed, size_t size, float* samples); 21 void PopulateSamples(int random_seed, size_t size, float* samples);
22 22
23 // Create an audio bus populated with random samples.
24 scoped_ptr<media::AudioBus> CreateRandomAudio(int random_seed,
25 int channels,
26 int samples);
27
28 // Create an ref counted audio bus populated with random samples. 23 // Create an ref counted audio bus populated with random samples.
29 scoped_refptr<media::AudioBusRefCounted> 24 scoped_refptr<media::AudioBusRefCounted>
30 CreateRandomAudioRefCounted(int random_seed, int channels, int samples); 25 CreateRandomAudioRefCounted(int random_seed, int channels, int samples);
31 26
32 } // namespace copresence 27 } // namespace copresence
33 28
34 #endif // COMPONENTS_COPRESENCE_TEST_AUDIO_TEST_SUPPORT_ 29 #endif // COMPONENTS_COPRESENCE_TEST_AUDIO_TEST_SUPPORT_H_
OLDNEW
« no previous file with comments | « components/copresence/mediums/audio/audio_manager_unittest.cc ('k') | components/copresence/test/audio_test_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698