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

Unified Diff: remoting/host/audio_capturer_win.cc

Issue 10823420: Added more error checking for audio packets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/audio_capturer_win.cc
diff --git a/remoting/host/audio_capturer_win.cc b/remoting/host/audio_capturer_win.cc
index 03bd426b7747f0af2ad9f0f85d23fc416cca8be5..4dfc174da4aedc96ecf3e875ce526d79c75763bf 100644
--- a/remoting/host/audio_capturer_win.cc
+++ b/remoting/host/audio_capturer_win.cc
@@ -294,10 +294,10 @@ void AudioCapturerWin::DoCapture() {
scoped_ptr<AudioPacket> packet =
scoped_ptr<AudioPacket>(new AudioPacket());
packet->add_data(data, frames * wave_format_ex_->nBlockAlign);
- packet->set_sampling_rate(sampling_rate_);
- packet->set_bytes_per_sample(
- static_cast<AudioPacket::BytesPerSample>(sizeof(int16)));
packet->set_encoding(AudioPacket::ENCODING_RAW);
+ packet->set_sampling_rate(sampling_rate_);
+ packet->set_bytes_per_sample(AudioPacket::BYTES_PER_SAMPLE_2);
+ packet->set_channels(AudioPacket::CHANNELS_STEREO);
callback_.Run(packet.Pass());
}
« remoting/codec/audio_decoder_verbatim.cc ('K') | « remoting/codec/audio_encoder_verbatim.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698