Changeset 104857 in webkit
- Timestamp:
- Jan 12, 2012 2:11:52 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r104855 r104857 1 2011-12-12 Jer Noble <jer.noble@apple.com> 2 3 WebAudio: Use Logging instead of printf. 4 https://bugs.webkit.org/show_bug.cgi?id=74322 5 6 Reviewed by Darin Adler. 7 8 No new tests; no net change in functionality. 9 10 Add a new WebCoreLogLevel for WebAudio, and use this new log level instead of 11 printf statements in webaudio classes. 12 13 * platform/Logging.cpp: 14 (WebCore::getChannelFromName): 15 * platform/Logging.h: 16 * platform/mac/LoggingMac.mm: 17 (WebCore::InitializeLoggingChannelsIfNecessary): 18 * platform/audio/FFTFrame.cpp: 19 (WebCore::FFTFrame::print): 20 * webaudio/DefaultAudioDestinationNode.cpp: 21 (WebCore::DefaultAudioDestinationNode::initialize): 22 1 23 2012-01-12 Anders Carlsson <andersca@apple.com> 2 24 -
trunk/Source/WebCore/platform/Logging.cpp
r69898 r104857 61 61 62 62 WTFLogChannel LogFileAPI = { 0x10000000, "WebCoreLogLevel", WTFLogChannelOff }; 63 64 WTFLogChannel LogWebAudio = { 0x20000000, "WebCoreLogLevel", WTFLogChannelOff }; 63 65 64 66 WTFLogChannel* getChannelFromName(const String& channelName) … … 136 138 return &LogFileAPI; 137 139 140 if (equalIgnoringCase(channelName, String("WebAudio"))) 141 return &LogWebAudio; 142 138 143 return 0; 139 144 } -
trunk/Source/WebCore/platform/Logging.h
r102235 r104857 60 60 extern WTFLogChannel LogProgress; 61 61 extern WTFLogChannel LogFileAPI; 62 extern WTFLogChannel LogWebAudio; 62 63 63 64 void initializeLoggingChannelsIfNecessary(); -
trunk/Source/WebCore/platform/audio/FFTFrame.cpp
r95901 r104857 37 37 #endif 38 38 39 #include "Logging.h" 39 40 #include <wtf/Complex.h> 40 41 #include <wtf/MathExtras.h> … … 254 255 float* realP = frame.realData(); 255 256 float* imagP = frame.imagData(); 256 printf("**** \n");257 printf("DC = %f : nyquist = %f\n", realP[0], imagP[0]);257 LOG(WebAudio, "**** \n"); 258 LOG(WebAudio, "DC = %f : nyquist = %f\n", realP[0], imagP[0]); 258 259 259 260 int n = m_FFTSize / 2; … … 263 264 double phase = atan2(realP[i], imagP[i]); 264 265 265 printf("[%d] (%f %f)\n", i, mag, phase);266 } 267 printf("****\n");266 LOG(WebAudio, "[%d] (%f %f)\n", i, mag, phase); 267 } 268 LOG(WebAudio, "****\n"); 268 269 } 269 270 #endif // NDEBUG -
trunk/Source/WebCore/platform/mac/LoggingMac.mm
r102235 r104857 73 73 initializeWithUserDefault(LogPlugins); 74 74 initializeWithUserDefault(LogArchives); 75 initializeWithUserDefault(LogWebAudio); 75 76 } 76 77 -
trunk/Source/WebCore/webaudio/DefaultAudioDestinationNode.cpp
r96745 r104857 29 29 #include "DefaultAudioDestinationNode.h" 30 30 31 #ifndef NDEBUG 32 #include <stdio.h> 33 #endif 31 #include "Logging.h" 34 32 35 33 namespace WebCore { … … 52 50 53 51 float hardwareSampleRate = AudioDestination::hardwareSampleRate(); 54 #ifndef NDEBUG 55 fprintf(stderr, ">>>> hardwareSampleRate = %f\n", hardwareSampleRate); 56 #endif 52 LOG(WebAudio, ">>>> hardwareSampleRate = %f\n", hardwareSampleRate); 57 53 58 54 m_destination = AudioDestination::create(*this, hardwareSampleRate);
Note: See TracChangeset
for help on using the changeset viewer.