Title: [113268] trunk/Source/WebCore
- Revision
- 113268
- Author
- [email protected]
- Date
- 2012-04-04 17:14:41 -0700 (Wed, 04 Apr 2012)
Log Message
WaveTable::waveDataForFundamentalFrequency() should properly interpret negative frequency
https://bugs.webkit.org/show_bug.cgi?id=83228
Reviewed by Kenneth Russell.
* Modules/webaudio/WaveTable.cpp:
(WebCore::WaveTable::waveDataForFundamentalFrequency):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (113267 => 113268)
--- trunk/Source/WebCore/ChangeLog 2012-04-05 00:05:24 UTC (rev 113267)
+++ trunk/Source/WebCore/ChangeLog 2012-04-05 00:14:41 UTC (rev 113268)
@@ -1,3 +1,13 @@
+2012-04-04 Chris Rogers <[email protected]>
+
+ WaveTable::waveDataForFundamentalFrequency() should properly interpret negative frequency
+ https://bugs.webkit.org/show_bug.cgi?id=83228
+
+ Reviewed by Kenneth Russell.
+
+ * Modules/webaudio/WaveTable.cpp:
+ (WebCore::WaveTable::waveDataForFundamentalFrequency):
+
2012-04-04 Adam Klein <[email protected]>
Delay post-insertion notifications until new DOM tree is complete
Modified: trunk/Source/WebCore/Modules/webaudio/WaveTable.cpp (113267 => 113268)
--- trunk/Source/WebCore/Modules/webaudio/WaveTable.cpp 2012-04-05 00:05:24 UTC (rev 113267)
+++ trunk/Source/WebCore/Modules/webaudio/WaveTable.cpp 2012-04-05 00:14:41 UTC (rev 113268)
@@ -100,6 +100,9 @@
void WaveTable::waveDataForFundamentalFrequency(float fundamentalFrequency, float* &lowerWaveData, float* &higherWaveData, float& tableInterpolationFactor)
{
+ // Negative frequencies are allowed, in which case we alias to the positive frequency.
+ fundamentalFrequency = fabsf(fundamentalFrequency);
+
// Calculate the pitch range.
float ratio = fundamentalFrequency > 0 ? fundamentalFrequency / m_lowestFundamentalFrequency : 0.5;
float centsAboveLowestFrequency = log2f(ratio) * 1200;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes