Title: [155112] trunk/Source/WebCore
- Revision
- 155112
- Author
- [email protected]
- Date
- 2013-09-05 06:25:50 -0700 (Thu, 05 Sep 2013)
Log Message
Precision updates in WebAudio.
https://bugs.webkit.org/show_bug.cgi?id=119739
Patch by Praveen R Jadhav <[email protected]> on 2013-09-05
Reviewed by Philippe Normand.
WebAudio Specification suggests to use 'double' datatypes
for minDecibels, maxDecibels and smoothingTimeConstant in
AnalyserNode.idl and currentTime in AudioContext.idl.
Current WebKit implementation has declared these attributes
as 'float' type.
Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioContext-section
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AnalyserNode
No new tests, covered by existing tests.
* Modules/webaudio/AnalyserNode.cpp:
(WebCore::AnalyserNode::setMinDecibels):
(WebCore::AnalyserNode::setMaxDecibels):
(WebCore::AnalyserNode::setSmoothingTimeConstant):
* Modules/webaudio/AnalyserNode.h:
(WebCore::AnalyserNode::minDecibels):
(WebCore::AnalyserNode::maxDecibels):
(WebCore::AnalyserNode::smoothingTimeConstant):
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/RealtimeAnalyser.h:
(WebCore::RealtimeAnalyser::setMinDecibels):
(WebCore::RealtimeAnalyser::minDecibels):
(WebCore::RealtimeAnalyser::setMaxDecibels):
(WebCore::RealtimeAnalyser::maxDecibels):
(WebCore::RealtimeAnalyser::setSmoothingTimeConstant):
(WebCore::RealtimeAnalyser::smoothingTimeConstant):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (155111 => 155112)
--- trunk/Source/WebCore/ChangeLog 2013-09-05 13:22:00 UTC (rev 155111)
+++ trunk/Source/WebCore/ChangeLog 2013-09-05 13:25:50 UTC (rev 155112)
@@ -1,3 +1,39 @@
+2013-09-05 Praveen R Jadhav <[email protected]>
+
+ Precision updates in WebAudio.
+ https://bugs.webkit.org/show_bug.cgi?id=119739
+
+ Reviewed by Philippe Normand.
+
+ WebAudio Specification suggests to use 'double' datatypes
+ for minDecibels, maxDecibels and smoothingTimeConstant in
+ AnalyserNode.idl and currentTime in AudioContext.idl.
+ Current WebKit implementation has declared these attributes
+ as 'float' type.
+
+ Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioContext-section
+ https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AnalyserNode
+
+ No new tests, covered by existing tests.
+
+ * Modules/webaudio/AnalyserNode.cpp:
+ (WebCore::AnalyserNode::setMinDecibels):
+ (WebCore::AnalyserNode::setMaxDecibels):
+ (WebCore::AnalyserNode::setSmoothingTimeConstant):
+ * Modules/webaudio/AnalyserNode.h:
+ (WebCore::AnalyserNode::minDecibels):
+ (WebCore::AnalyserNode::maxDecibels):
+ (WebCore::AnalyserNode::smoothingTimeConstant):
+ * Modules/webaudio/AnalyserNode.idl:
+ * Modules/webaudio/AudioContext.idl:
+ * Modules/webaudio/RealtimeAnalyser.h:
+ (WebCore::RealtimeAnalyser::setMinDecibels):
+ (WebCore::RealtimeAnalyser::minDecibels):
+ (WebCore::RealtimeAnalyser::setMaxDecibels):
+ (WebCore::RealtimeAnalyser::maxDecibels):
+ (WebCore::RealtimeAnalyser::setSmoothingTimeConstant):
+ (WebCore::RealtimeAnalyser::smoothingTimeConstant):
+
2013-09-05 Mihnea Ovidenie <[email protected]>
Replace node() calls with generatingNode() for RenderRegion code
Modified: trunk/Source/WebCore/Modules/webaudio/AnalyserNode.cpp (155111 => 155112)
--- trunk/Source/WebCore/Modules/webaudio/AnalyserNode.cpp 2013-09-05 13:22:00 UTC (rev 155111)
+++ trunk/Source/WebCore/Modules/webaudio/AnalyserNode.cpp 2013-09-05 13:25:50 UTC (rev 155112)
@@ -78,7 +78,7 @@
ec = INDEX_SIZE_ERR;
}
-void AnalyserNode::setMinDecibels(float k, ExceptionCode& ec)
+void AnalyserNode::setMinDecibels(double k, ExceptionCode& ec)
{
if (k > maxDecibels()) {
ec = INDEX_SIZE_ERR;
@@ -88,7 +88,7 @@
m_analyser.setMinDecibels(k);
}
-void AnalyserNode::setMaxDecibels(float k, ExceptionCode& ec)
+void AnalyserNode::setMaxDecibels(double k, ExceptionCode& ec)
{
if (k < minDecibels()) {
ec = INDEX_SIZE_ERR;
@@ -98,7 +98,7 @@
m_analyser.setMaxDecibels(k);
}
-void AnalyserNode::setSmoothingTimeConstant(float k, ExceptionCode& ec)
+void AnalyserNode::setSmoothingTimeConstant(double k, ExceptionCode& ec)
{
if (k < 0 || k > 1) {
ec = INDEX_SIZE_ERR;
Modified: trunk/Source/WebCore/Modules/webaudio/AnalyserNode.h (155111 => 155112)
--- trunk/Source/WebCore/Modules/webaudio/AnalyserNode.h 2013-09-05 13:22:00 UTC (rev 155111)
+++ trunk/Source/WebCore/Modules/webaudio/AnalyserNode.h 2013-09-05 13:25:50 UTC (rev 155112)
@@ -50,14 +50,14 @@
unsigned frequencyBinCount() const { return m_analyser.frequencyBinCount(); }
- void setMinDecibels(float k, ExceptionCode&);
- float minDecibels() const { return m_analyser.minDecibels(); }
+ void setMinDecibels(double k, ExceptionCode&);
+ double minDecibels() const { return m_analyser.minDecibels(); }
- void setMaxDecibels(float k, ExceptionCode&);
- float maxDecibels() const { return m_analyser.maxDecibels(); }
+ void setMaxDecibels(double k, ExceptionCode&);
+ double maxDecibels() const { return m_analyser.maxDecibels(); }
- void setSmoothingTimeConstant(float k, ExceptionCode&);
- float smoothingTimeConstant() const { return m_analyser.smoothingTimeConstant(); }
+ void setSmoothingTimeConstant(double k, ExceptionCode&);
+ double smoothingTimeConstant() const { return m_analyser.smoothingTimeConstant(); }
void getFloatFrequencyData(JSC::Float32Array* array) { m_analyser.getFloatFrequencyData(array); }
void getByteFrequencyData(JSC::Uint8Array* array) { m_analyser.getByteFrequencyData(array); }
Modified: trunk/Source/WebCore/Modules/webaudio/AnalyserNode.idl (155111 => 155112)
--- trunk/Source/WebCore/Modules/webaudio/AnalyserNode.idl 2013-09-05 13:22:00 UTC (rev 155111)
+++ trunk/Source/WebCore/Modules/webaudio/AnalyserNode.idl 2013-09-05 13:25:50 UTC (rev 155112)
@@ -30,11 +30,11 @@
readonly attribute unsigned long frequencyBinCount;
// minDecibels / maxDecibels represent the range to scale the FFT analysis data for conversion to unsigned byte values.
- [SetterRaisesException] attribute float minDecibels;
- [SetterRaisesException] attribute float maxDecibels;
+ [SetterRaisesException] attribute double minDecibels;
+ [SetterRaisesException] attribute double maxDecibels;
// A value from 0.0 -> 1.0 where 0.0 represents no time averaging with the last analysis frame.
- [SetterRaisesException] attribute float smoothingTimeConstant;
+ [SetterRaisesException] attribute double smoothingTimeConstant;
// Copies the current frequency data into the passed array.
// If the array has fewer elements than the frequencyBinCount, the excess elements will be dropped.
Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.idl (155111 => 155112)
--- trunk/Source/WebCore/Modules/webaudio/AudioContext.idl 2013-09-05 13:22:00 UTC (rev 155111)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.idl 2013-09-05 13:25:50 UTC (rev 155112)
@@ -35,7 +35,7 @@
readonly attribute AudioDestinationNode destination;
// All scheduled times are relative to this time in seconds.
- readonly attribute float currentTime;
+ readonly attribute double currentTime;
// All AudioNodes in the context run at this sample-rate (sample-frames per second).
readonly attribute float sampleRate;
Modified: trunk/Source/WebCore/Modules/webaudio/RealtimeAnalyser.h (155111 => 155112)
--- trunk/Source/WebCore/Modules/webaudio/RealtimeAnalyser.h 2013-09-05 13:22:00 UTC (rev 155111)
+++ trunk/Source/WebCore/Modules/webaudio/RealtimeAnalyser.h 2013-09-05 13:25:50 UTC (rev 155112)
@@ -50,14 +50,14 @@
unsigned frequencyBinCount() const { return m_fftSize / 2; }
- void setMinDecibels(float k) { m_minDecibels = k; }
- float minDecibels() const { return static_cast<float>(m_minDecibels); }
+ void setMinDecibels(double k) { m_minDecibels = k; }
+ double minDecibels() const { return m_minDecibels; }
- void setMaxDecibels(float k) { m_maxDecibels = k; }
- float maxDecibels() const { return static_cast<float>(m_maxDecibels); }
+ void setMaxDecibels(double k) { m_maxDecibels = k; }
+ double maxDecibels() const { return m_maxDecibels; }
- void setSmoothingTimeConstant(float k) { m_smoothingTimeConstant = k; }
- float smoothingTimeConstant() const { return static_cast<float>(m_smoothingTimeConstant); }
+ void setSmoothingTimeConstant(double k) { m_smoothingTimeConstant = k; }
+ double smoothingTimeConstant() const { return m_smoothingTimeConstant; }
void getFloatFrequencyData(JSC::Float32Array*);
void getByteFrequencyData(JSC::Uint8Array*);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes