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

Side by Side Diff: remoting/client/audio_player_unittest.cc

Issue 1545723002: Use std::move() instead of .Pass() in remoting/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass_host
Patch Set: Created 5 years 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 | « remoting/client/audio_decode_scheduler.cc ('k') | remoting/client/chromoting_client.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "remoting/client/audio_player.h" 5 #include "remoting/client/audio_player.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 packet->set_encoding(AudioPacket::ENCODING_RAW); 92 packet->set_encoding(AudioPacket::ENCODING_RAW);
93 packet->set_sampling_rate(rate); 93 packet->set_sampling_rate(rate);
94 packet->set_bytes_per_sample(AudioPacket::BYTES_PER_SAMPLE_2); 94 packet->set_bytes_per_sample(AudioPacket::BYTES_PER_SAMPLE_2);
95 packet->set_channels(AudioPacket::CHANNELS_STEREO); 95 packet->set_channels(AudioPacket::CHANNELS_STEREO);
96 96
97 // The data must be a multiple of 4 bytes (channels x bytes_per_sample). 97 // The data must be a multiple of 4 bytes (channels x bytes_per_sample).
98 std::string data; 98 std::string data;
99 data.resize(samples * kAudioSampleBytes, kDummyAudioData); 99 data.resize(samples * kAudioSampleBytes, kDummyAudioData);
100 packet->add_data(data); 100 packet->add_data(data);
101 101
102 return packet.Pass(); 102 return packet;
103 } 103 }
104 104
105 scoped_ptr<AudioPacket> CreatePacket44100Hz(int samples) { 105 scoped_ptr<AudioPacket> CreatePacket44100Hz(int samples) {
106 return CreatePacketWithSamplingRate(AudioPacket::SAMPLING_RATE_44100, 106 return CreatePacketWithSamplingRate(AudioPacket::SAMPLING_RATE_44100,
107 samples); 107 samples);
108 } 108 }
109 109
110 scoped_ptr<AudioPacket> CreatePacket48000Hz(int samples) { 110 scoped_ptr<AudioPacket> CreatePacket48000Hz(int samples) {
111 return CreatePacketWithSamplingRate(AudioPacket::SAMPLING_RATE_48000, 111 return CreatePacketWithSamplingRate(AudioPacket::SAMPLING_RATE_48000,
112 samples); 112 samples);
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 303
304 // Attempt to consume a frame of 25 samples. 304 // Attempt to consume a frame of 25 samples.
305 ConsumeAudioFrame(); 305 ConsumeAudioFrame();
306 ASSERT_EQ(0, GetNumQueuedSamples()); 306 ASSERT_EQ(0, GetNumQueuedSamples());
307 ASSERT_EQ(0, GetNumQueuedPackets()); 307 ASSERT_EQ(0, GetNumQueuedPackets());
308 ASSERT_EQ(0, GetBytesConsumed()); 308 ASSERT_EQ(0, GetBytesConsumed());
309 CheckAudioFrameBytes(packet1_samples * kAudioSampleBytes); 309 CheckAudioFrameBytes(packet1_samples * kAudioSampleBytes);
310 } 310 }
311 311
312 } // namespace remoting 312 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/audio_decode_scheduler.cc ('k') | remoting/client/chromoting_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698