| OLD | NEW |
| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 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 size_t number_of_channels, |
| 71 size_t 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_); |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |