Title: [101644] trunk/Source/WebCore
- Revision
- 101644
- Author
- [email protected]
- Date
- 2011-12-01 02:48:27 -0800 (Thu, 01 Dec 2011)
Log Message
[GTK] WebAudio wav resources access and management
https://bugs.webkit.org/show_bug.cgi?id=73080
Reviewed by Martin Robinson.
For the uninstalled case we assume the user will set a
AUDIO_RESOURCES_PATH environment variable pointing to
WebCore/platform/audio/resources.
* GNUmakefile.am: Install WAV resources.
* platform/audio/gtk/AudioBusGtk.cpp:
(WebCore::AudioBus::loadPlatformResource): Support for loading
uninstalled resources.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (101643 => 101644)
--- trunk/Source/WebCore/ChangeLog 2011-12-01 10:36:58 UTC (rev 101643)
+++ trunk/Source/WebCore/ChangeLog 2011-12-01 10:48:27 UTC (rev 101644)
@@ -1,3 +1,19 @@
+2011-12-01 Philippe Normand <[email protected]>
+
+ [GTK] WebAudio wav resources access and management
+ https://bugs.webkit.org/show_bug.cgi?id=73080
+
+ Reviewed by Martin Robinson.
+
+ For the uninstalled case we assume the user will set a
+ AUDIO_RESOURCES_PATH environment variable pointing to
+ WebCore/platform/audio/resources.
+
+ * GNUmakefile.am: Install WAV resources.
+ * platform/audio/gtk/AudioBusGtk.cpp:
+ (WebCore::AudioBus::loadPlatformResource): Support for loading
+ uninstalled resources.
+
2011-12-01 Florin Malita <[email protected]>
SVG Gaussian blur in 1-dimension is incorrect
Modified: trunk/Source/WebCore/GNUmakefile.am (101643 => 101644)
--- trunk/Source/WebCore/GNUmakefile.am 2011-12-01 10:36:58 UTC (rev 101643)
+++ trunk/Source/WebCore/GNUmakefile.am 2011-12-01 10:48:27 UTC (rev 101644)
@@ -721,6 +721,13 @@
DerivedSources/WebCore/InjectedScriptSource.h: $(WebCore)/inspector/InjectedScriptSource.js
perl $(WebCore)/inspector/xxd.pl InjectedScriptSource_js $(WebCore)/inspector/InjectedScriptSource.js $(GENSOURCES_WEBCORE)/InjectedScriptSource.h
+if ENABLE_WEB_AUDIO
+# Installing HRTF database wav files
+audiodir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/resources/audio/
+audio_DATA = $(WebCore)/platform/audio/resources/Composite.wav
+dist_audio_DATA = $(audio_DATA)
+endif # END ENABLE_WEB_AUDIO
+
# ANGLE tokenizer & parser
DerivedSources/ANGLE/glslang.cpp: Source/ThirdParty/ANGLE/src/compiler/glslang.l
$(AM_V_GEN)$(FLEX) --noline --nounistd --outfile="$@" "$<"
Modified: trunk/Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp (101643 => 101644)
--- trunk/Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp 2011-12-01 10:36:58 UTC (rev 101643)
+++ trunk/Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp 2011-12-01 10:48:27 UTC (rev 101644)
@@ -34,6 +34,13 @@
{
GOwnPtr<gchar> filename(g_strdup_printf("%s.wav", name));
GOwnPtr<gchar> absoluteFilename(g_build_filename(DATA_DIR, "webkitgtk-"WEBKITGTK_API_VERSION_STRING, "resources", "audio", filename.get(), NULL));
+
+ GFile* file = g_file_new_for_path(filename.get());
+ if (!g_file_query_exists(file, 0)) {
+ // Uninstalled case, assume we're in the WebKit root directory.
+ const char* environmentPath = getenv("AUDIO_RESOURCES_PATH");
+ absoluteFilename.set(g_build_filename(environmentPath, filename.get(), NULL));
+ }
return createBusFromAudioFile(absoluteFilename.get(), false, sampleRate);
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes