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

Side by Side Diff: talk/app/webrtc/mediastreamhandler.cc

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 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 unified diff | Download patch
« no previous file with comments | « talk/app/webrtc/mediastreamhandler.h ('k') | talk/app/webrtc/mediastreaminterface.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 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 LocalAudioSinkAdapter::~LocalAudioSinkAdapter() { 61 LocalAudioSinkAdapter::~LocalAudioSinkAdapter() {
62 rtc::CritScope lock(&lock_); 62 rtc::CritScope lock(&lock_);
63 if (sink_) 63 if (sink_)
64 sink_->OnClose(); 64 sink_->OnClose();
65 } 65 }
66 66
67 void LocalAudioSinkAdapter::OnData(const void* audio_data, 67 void LocalAudioSinkAdapter::OnData(const void* audio_data,
68 int bits_per_sample, 68 int bits_per_sample,
69 int sample_rate, 69 int sample_rate,
70 int number_of_channels, 70 int number_of_channels,
71 int number_of_frames) { 71 size_t number_of_frames) {
72 rtc::CritScope lock(&lock_); 72 rtc::CritScope lock(&lock_);
73 if (sink_) { 73 if (sink_) {
74 sink_->OnData(audio_data, bits_per_sample, sample_rate, 74 sink_->OnData(audio_data, bits_per_sample, sample_rate,
75 number_of_channels, number_of_frames); 75 number_of_channels, number_of_frames);
76 } 76 }
77 } 77 }
78 78
79 void LocalAudioSinkAdapter::SetSink(cricket::AudioRenderer::Sink* sink) { 79 void LocalAudioSinkAdapter::SetSink(cricket::AudioRenderer::Sink* sink) {
80 rtc::CritScope lock(&lock_); 80 rtc::CritScope lock(&lock_);
81 ASSERT(!sink || !sink_); 81 ASSERT(!sink || !sink_);
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 if ((*it)->stream() == stream) { 477 if ((*it)->stream() == stream) {
478 (*it)->Stop(); 478 (*it)->Stop();
479 delete *it; 479 delete *it;
480 streamhandlers->erase(it); 480 streamhandlers->erase(it);
481 break; 481 break;
482 } 482 }
483 } 483 }
484 } 484 }
485 485
486 } // namespace webrtc 486 } // namespace webrtc
OLDNEW
« no previous file with comments | « talk/app/webrtc/mediastreamhandler.h ('k') | talk/app/webrtc/mediastreaminterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698