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

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

Issue 1988053005: media: Replace wtf/Assertions.h macros in favor of base/logging.h macros (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 { 66 {
67 m_mediaElement->setAudioSourceNode(nullptr); 67 m_mediaElement->setAudioSourceNode(nullptr);
68 AudioHandler::dispose(); 68 AudioHandler::dispose();
69 } 69 }
70 70
71 void MediaElementAudioSourceHandler::setFormat(size_t numberOfChannels, float so urceSampleRate) 71 void MediaElementAudioSourceHandler::setFormat(size_t numberOfChannels, float so urceSampleRate)
72 { 72 {
73 if (numberOfChannels != m_sourceNumberOfChannels || sourceSampleRate != m_so urceSampleRate) { 73 if (numberOfChannels != m_sourceNumberOfChannels || sourceSampleRate != m_so urceSampleRate) {
74 if (!numberOfChannels || numberOfChannels > AbstractAudioContext::maxNum berOfChannels() || !AudioUtilities::isValidAudioBufferSampleRate(sourceSampleRat e)) { 74 if (!numberOfChannels || numberOfChannels > AbstractAudioContext::maxNum berOfChannels() || !AudioUtilities::isValidAudioBufferSampleRate(sourceSampleRat e)) {
75 // process() will generate silence for these uninitialized values. 75 // process() will generate silence for these uninitialized values.
76 WTF_LOG(Media, "MediaElementAudioSourceNode::setFormat(%u, %f) - unh andled format change", static_cast<unsigned>(numberOfChannels), sourceSampleRate ); 76 DVLOG(3) << "setFormat(" << numberOfChannels << ", " << sourceSample Rate << ") - unhandled format change";
Raymond Toy 2016/05/19 14:48:42 How did you decide on 3? Doesn't WTF_LOG always p
Srirama 2016/05/19 14:54:44 We are using 3 in core/html media files, to make i
Raymond Toy 2016/05/19 15:31:37 I see. I think these are fairly rare. Can we jus
Srirama 2016/05/20 07:33:39 Even WTF_LOG will print only in debug mode and if
77 // Synchronize with process(). 77 // Synchronize with process().
78 Locker<MediaElementAudioSourceHandler> locker(*this); 78 Locker<MediaElementAudioSourceHandler> locker(*this);
79 m_sourceNumberOfChannels = 0; 79 m_sourceNumberOfChannels = 0;
80 m_sourceSampleRate = 0; 80 m_sourceSampleRate = 0;
81 return; 81 return;
82 } 82 }
83 83
84 // Synchronize with process() to protect m_sourceNumberOfChannels, 84 // Synchronize with process() to protect m_sourceNumberOfChannels,
85 // m_sourceSampleRate, and m_multiChannelResampler. 85 // m_sourceSampleRate, and m_multiChannelResampler.
86 Locker<MediaElementAudioSourceHandler> locker(*this); 86 Locker<MediaElementAudioSourceHandler> locker(*this);
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 mediaElementAudioSourceHandler().lock(); 244 mediaElementAudioSourceHandler().lock();
245 } 245 }
246 246
247 void MediaElementAudioSourceNode::unlock() 247 void MediaElementAudioSourceNode::unlock()
248 { 248 {
249 mediaElementAudioSourceHandler().unlock(); 249 mediaElementAudioSourceHandler().unlock();
250 } 250 }
251 251
252 } // namespace blink 252 } // namespace blink
253 253
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698