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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp

Issue 2007983006: Rename OwnPtr::clear() to reset() in modules/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 Locker<MediaElementAudioSourceHandler> locker(*this); 86 Locker<MediaElementAudioSourceHandler> locker(*this);
87 87
88 m_sourceNumberOfChannels = numberOfChannels; 88 m_sourceNumberOfChannels = numberOfChannels;
89 m_sourceSampleRate = sourceSampleRate; 89 m_sourceSampleRate = sourceSampleRate;
90 90
91 if (sourceSampleRate != sampleRate()) { 91 if (sourceSampleRate != sampleRate()) {
92 double scaleFactor = sourceSampleRate / sampleRate(); 92 double scaleFactor = sourceSampleRate / sampleRate();
93 m_multiChannelResampler = adoptPtr(new MultiChannelResampler(scaleFa ctor, numberOfChannels)); 93 m_multiChannelResampler = adoptPtr(new MultiChannelResampler(scaleFa ctor, numberOfChannels));
94 } else { 94 } else {
95 // Bypass resampling. 95 // Bypass resampling.
96 m_multiChannelResampler.clear(); 96 m_multiChannelResampler.reset();
97 } 97 }
98 98
99 { 99 {
100 // The context must be locked when changing the number of output cha nnels. 100 // The context must be locked when changing the number of output cha nnels.
101 AbstractAudioContext::AutoLocker contextLocker(context()); 101 AbstractAudioContext::AutoLocker contextLocker(context());
102 102
103 // Do any necesssary re-configuration to the output's number of chan nels. 103 // Do any necesssary re-configuration to the output's number of chan nels.
104 output(0).setNumberOfChannels(numberOfChannels); 104 output(0).setNumberOfChannels(numberOfChannels);
105 } 105 }
106 } 106 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 mediaElementAudioSourceHandler().lock(); 242 mediaElementAudioSourceHandler().lock();
243 } 243 }
244 244
245 void MediaElementAudioSourceNode::unlock() 245 void MediaElementAudioSourceNode::unlock()
246 { 246 {
247 mediaElementAudioSourceHandler().unlock(); 247 mediaElementAudioSourceHandler().unlock();
248 } 248 }
249 249
250 } // namespace blink 250 } // namespace blink
251 251
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698