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

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

Issue 2840943002: Update DEBUG_AUDIONODE_REFERENCES to new coding style (Closed)
Patch Set: Turn off flag Created 3 years, 8 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 | « third_party/WebKit/Source/modules/webaudio/AudioNode.cpp ('k') | no next file » | 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 * Copyright (C) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 exception_state.ThrowDOMException( 97 exception_state.ThrowDOMException(
98 kNotSupportedError, "OfflineAudioContext(" + 98 kNotSupportedError, "OfflineAudioContext(" +
99 String::Number(number_of_channels) + ", " + 99 String::Number(number_of_channels) + ", " +
100 String::Number(number_of_frames) + ", " + 100 String::Number(number_of_frames) + ", " +
101 String::Number(sample_rate) + ")"); 101 String::Number(sample_rate) + ")");
102 return nullptr; 102 return nullptr;
103 } 103 }
104 104
105 #if DEBUG_AUDIONODE_REFERENCES 105 #if DEBUG_AUDIONODE_REFERENCES
106 fprintf(stderr, "[%16p]: OfflineAudioContext::OfflineAudioContext()\n", 106 fprintf(stderr, "[%16p]: OfflineAudioContext::OfflineAudioContext()\n",
107 audioContext); 107 audio_context);
108 #endif 108 #endif
109 DEFINE_STATIC_LOCAL(SparseHistogram, offline_context_channel_count_histogram, 109 DEFINE_STATIC_LOCAL(SparseHistogram, offline_context_channel_count_histogram,
110 ("WebAudio.OfflineAudioContext.ChannelCount")); 110 ("WebAudio.OfflineAudioContext.ChannelCount"));
111 // Arbitrarly limit the maximum length to 1 million frames (about 20 sec 111 // Arbitrarly limit the maximum length to 1 million frames (about 20 sec
112 // at 48kHz). The number of buckets is fairly arbitrary. 112 // at 48kHz). The number of buckets is fairly arbitrary.
113 DEFINE_STATIC_LOCAL(CustomCountHistogram, offline_context_length_histogram, 113 DEFINE_STATIC_LOCAL(CustomCountHistogram, offline_context_length_histogram,
114 ("WebAudio.OfflineAudioContext.Length", 1, 1000000, 50)); 114 ("WebAudio.OfflineAudioContext.Length", 1, 1000000, 50));
115 // The limits are the min and max AudioBuffer sample rates currently 115 // The limits are the min and max AudioBuffer sample rates currently
116 // supported. We use explicit values here instead of 116 // supported. We use explicit values here instead of
117 // AudioUtilities::minAudioBufferSampleRate() and 117 // AudioUtilities::minAudioBufferSampleRate() and
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 452
453 // Note that the GraphLock is required before this check. Since this needs 453 // Note that the GraphLock is required before this check. Since this needs
454 // to run on the audio thread, OfflineGraphAutoLocker must be used. 454 // to run on the audio thread, OfflineGraphAutoLocker must be used.
455 if (scheduled_suspends_.Contains(CurrentSampleFrame())) 455 if (scheduled_suspends_.Contains(CurrentSampleFrame()))
456 return true; 456 return true;
457 457
458 return false; 458 return false;
459 } 459 }
460 460
461 } // namespace blink 461 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/AudioNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698