Title: [126757] trunk/Source/WebCore
Revision
126757
Author
[email protected]
Date
2012-08-27 07:08:50 -0700 (Mon, 27 Aug 2012)

Log Message

[GStreamer][Qt] WebAudio support
https://bugs.webkit.org/show_bug.cgi?id=94806

Reviewed by Simon Hausmann.

Build fix after r126756 in which I forgot to add the new
AudioBusQt.cpp file.

* platform/audio/qt/AudioBusQt.cpp: Added.
(WebCore):
(WebCore::AudioBus::loadPlatformResource):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (126756 => 126757)


--- trunk/Source/WebCore/ChangeLog	2012-08-27 14:01:43 UTC (rev 126756)
+++ trunk/Source/WebCore/ChangeLog	2012-08-27 14:08:50 UTC (rev 126757)
@@ -5,6 +5,20 @@
 
         Reviewed by Simon Hausmann.
 
+        Build fix after r126756 in which I forgot to add the new
+        AudioBusQt.cpp file.
+
+        * platform/audio/qt/AudioBusQt.cpp: Added.
+        (WebCore):
+        (WebCore::AudioBus::loadPlatformResource):
+
+2012-08-27  Philippe Normand  <[email protected]>
+
+        [GStreamer][Qt] WebAudio support
+        https://bugs.webkit.org/show_bug.cgi?id=94806
+
+        Reviewed by Simon Hausmann.
+
         Build system changes to support WebAudio and its GStreamer
         backend. A new AudioBusQt implementation is also needed to locate
         and load local .wav files. Note: WebAudio is still disabled by default in

Added: trunk/Source/WebCore/platform/audio/qt/AudioBusQt.cpp (0 => 126757)


--- trunk/Source/WebCore/platform/audio/qt/AudioBusQt.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/audio/qt/AudioBusQt.cpp	2012-08-27 14:08:50 UTC (rev 126757)
@@ -0,0 +1,40 @@
+/*
+ *  Copyright (C) 2012 Igalia S.L
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "config.h"
+
+#if ENABLE(WEB_AUDIO)
+
+#include "AudioBus.h"
+
+#include "AudioFileReader.h"
+#include <QResource>
+
+namespace WebCore {
+
+PassOwnPtr<AudioBus> AudioBus::loadPlatformResource(const char* name, float sampleRate)
+{
+    QString path = QStringLiteral(":/webkit/resources/audio/");
+    path.append(QLatin1String(name));
+    QResource resource(path);
+    return createBusFromInMemoryAudioFile(resource.data(), resource.size(), /* mixToMono */ false, sampleRate);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_AUDIO)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to