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

Unified Diff: Source/platform/audio/AudioBus.cpp

Issue 194753005: Remove unnecassary parameter "sampleRate" for loadAudioResource(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | public/platform/Platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/audio/AudioBus.cpp
diff --git a/Source/platform/audio/AudioBus.cpp b/Source/platform/audio/AudioBus.cpp
index e28708fe8585ce77efda043c997fbfa0f4c0bdc6..a086bef617496ec85d13bedabc45d275a845e5a0 100644
--- a/Source/platform/audio/AudioBus.cpp
+++ b/Source/platform/audio/AudioBus.cpp
@@ -635,10 +635,10 @@ void AudioBus::clearSilentFlag()
m_channels[i]->clearSilentFlag();
}
-PassRefPtr<AudioBus> decodeAudioFileData(const char* data, size_t size, double sampleRate)
+PassRefPtr<AudioBus> decodeAudioFileData(const char* data, size_t size)
{
blink::WebAudioBus webAudioBus;
- if (blink::Platform::current()->loadAudioResource(&webAudioBus, data, size, sampleRate))
+ if (blink::Platform::current()->loadAudioResource(&webAudioBus, data, size))
return webAudioBus.release();
return nullptr;
}
@@ -649,8 +649,7 @@ PassRefPtr<AudioBus> AudioBus::loadPlatformResource(const char* name, float samp
if (resource.isEmpty())
return nullptr;
- // FIXME: the sampleRate parameter is ignored. It should be removed from the API.
- RefPtr<AudioBus> audioBus = decodeAudioFileData(resource.data(), resource.size(), sampleRate);
+ RefPtr<AudioBus> audioBus = decodeAudioFileData(resource.data(), resource.size());
if (!audioBus.get())
return nullptr;
@@ -664,8 +663,7 @@ PassRefPtr<AudioBus> AudioBus::loadPlatformResource(const char* name, float samp
PassRefPtr<AudioBus> createBusFromInMemoryAudioFile(const void* data, size_t dataSize, bool mixToMono, float sampleRate)
{
- // FIXME: the sampleRate parameter is ignored. It should be removed from the API.
- RefPtr<AudioBus> audioBus = decodeAudioFileData(static_cast<const char*>(data), dataSize, sampleRate);
+ RefPtr<AudioBus> audioBus = decodeAudioFileData(static_cast<const char*>(data), dataSize);
if (!audioBus.get())
return nullptr;
« no previous file with comments | « no previous file | public/platform/Platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698