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

Unified Diff: webkit/glue/webkitplatformsupport_impl.cc

Issue 12457043: Android implementation of WebAudio audio file decoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: webkit/glue/webkitplatformsupport_impl.cc
diff --git a/webkit/glue/webkitplatformsupport_impl.cc b/webkit/glue/webkitplatformsupport_impl.cc
index bb06120ab85ae73ee87eb9b9da2c00472f9afc54..834ba1dfcb2db76788daeac55aaaf3c665bed1f9 100644
--- a/webkit/glue/webkitplatformsupport_impl.cc
+++ b/webkit/glue/webkitplatformsupport_impl.cc
@@ -675,10 +675,20 @@ WebData WebKitPlatformSupportImpl::loadResource(const char* name) {
bool WebKitPlatformSupportImpl::loadAudioResource(
WebKit::WebAudioBus* destination_bus, const char* audio_file_data,
size_t data_size, double sample_rate) {
+#if !defined(OS_ANDROID)
return webkit_media::DecodeAudioFileData(destination_bus,
audio_file_data,
data_size,
sample_rate);
+#else
+ webkit_media::WebAudioMediaCodecRunner runner = GetWebAudioMediaCodecRunner();
+ return webkit_media::DecodeAudioFileData(
+ destination_bus,
+ audio_file_data,
+ data_size,
+ sample_rate,
+ runner);
+#endif
}
WebString WebKitPlatformSupportImpl::queryLocalizedString(
@@ -961,5 +971,14 @@ WebKit::WebDiscardableMemory*
return NULL;
}
+/* static */
+void WebKitPlatformSupportImpl::NullRunWebAudioMediaCodec(
+ base::SharedMemoryHandle encoded_data_handle,
+ base::FileDescriptor pcm_output) {
+}
+webkit_media::WebAudioMediaCodecRunner
+ WebKitPlatformSupportImpl::GetWebAudioMediaCodecRunner() {
+ return base::Bind(&WebKitPlatformSupportImpl::NullRunWebAudioMediaCodec);
+}
} // namespace webkit_glue

Powered by Google App Engine
This is Rietveld 408576698