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

Side by Side Diff: media/cast/test/utility/audio_utility.h

Issue 1905763002: Convert //media/cast from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « media/cast/test/simulator.cc ('k') | media/cast/test/utility/audio_utility.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 MEDIA_CAST_TEST_UTILITY_AUDIO_UTILITY_H_ 5 #ifndef MEDIA_CAST_TEST_UTILITY_AUDIO_UTILITY_H_
6 #define MEDIA_CAST_TEST_UTILITY_AUDIO_UTILITY_H_ 6 #define MEDIA_CAST_TEST_UTILITY_AUDIO_UTILITY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 16 matching lines...) Expand all
27 class TestAudioBusFactory { 27 class TestAudioBusFactory {
28 public: 28 public:
29 TestAudioBusFactory(int num_channels, 29 TestAudioBusFactory(int num_channels,
30 int sample_rate, 30 int sample_rate,
31 float sine_wave_frequency, 31 float sine_wave_frequency,
32 float volume); 32 float volume);
33 ~TestAudioBusFactory(); 33 ~TestAudioBusFactory();
34 34
35 // Creates a new AudioBus of the given |duration|, filled with the next batch 35 // Creates a new AudioBus of the given |duration|, filled with the next batch
36 // of sine wave samples. 36 // of sine wave samples.
37 scoped_ptr<AudioBus> NextAudioBus(const base::TimeDelta& duration); 37 std::unique_ptr<AudioBus> NextAudioBus(const base::TimeDelta& duration);
38 38
39 // A reasonable test tone. 39 // A reasonable test tone.
40 static const int kMiddleANoteFreq = 440; 40 static const int kMiddleANoteFreq = 440;
41 41
42 private: 42 private:
43 const int num_channels_; 43 const int num_channels_;
44 const int sample_rate_; 44 const int sample_rate_;
45 const float volume_; 45 const float volume_;
46 SineWaveAudioSource source_; 46 SineWaveAudioSource source_;
47 47
(...skipping 29 matching lines...) Expand all
77 float* samples); 77 float* samples);
78 78
79 // Decode a timestamp encoded with EncodeTimestamp. Returns true if a 79 // Decode a timestamp encoded with EncodeTimestamp. Returns true if a
80 // timestamp was found in |samples|. 80 // timestamp was found in |samples|.
81 bool DecodeTimestamp(const float* samples, size_t length, uint16_t* timestamp); 81 bool DecodeTimestamp(const float* samples, size_t length, uint16_t* timestamp);
82 82
83 } // namespace cast 83 } // namespace cast
84 } // namespace media 84 } // namespace media
85 85
86 #endif // MEDIA_CAST_TEST_UTILITY_AUDIO_UTILITY_H_ 86 #endif // MEDIA_CAST_TEST_UTILITY_AUDIO_UTILITY_H_
OLDNEW
« no previous file with comments | « media/cast/test/simulator.cc ('k') | media/cast/test/utility/audio_utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698