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

Unified Diff: third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.cpp

Issue 2501863003: Support for AudioContextOptions latencyHint. (Closed)
Patch Set: Add baseLatency and fix use of hardwareSampleRate. Created 4 years, 1 month 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: third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.cpp
index 89a0541e38898a701ac1df66708aaa15ef6fcc0f..60a929b50173c164ac96ac45a4083aef9ed92a57 100644
--- a/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.cpp
@@ -69,11 +69,11 @@ MediaStreamAudioSourceHandler::~MediaStreamAudioSourceHandler() {
void MediaStreamAudioSourceHandler::setFormat(size_t numberOfChannels,
float sourceSampleRate) {
if (numberOfChannels != m_sourceNumberOfChannels ||
- sourceSampleRate != sampleRate()) {
+ sourceSampleRate != context()->sampleRate()) {
// The sample-rate must be equal to the context's sample-rate.
if (!numberOfChannels ||
numberOfChannels > BaseAudioContext::maxNumberOfChannels() ||
- sourceSampleRate != sampleRate()) {
+ sourceSampleRate != context()->sampleRate()) {
// process() will generate silence for these uninitialized values.
DLOG(ERROR) << "setFormat(" << numberOfChannels << ", "
<< sourceSampleRate << ") - unhandled format change";

Powered by Google App Engine
This is Rietveld 408576698