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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp

Issue 2501863003: Support for AudioContextOptions latencyHint. (Closed)
Patch Set: Rebasing Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 26 matching lines...) Expand all
37 #include "platform/audio/HRTFDatabaseLoader.h" 37 #include "platform/audio/HRTFDatabaseLoader.h"
38 #include "public/platform/Platform.h" 38 #include "public/platform/Platform.h"
39 #include "wtf/PtrUtil.h" 39 #include "wtf/PtrUtil.h"
40 #include <algorithm> 40 #include <algorithm>
41 41
42 namespace blink { 42 namespace blink {
43 43
44 OfflineAudioDestinationHandler::OfflineAudioDestinationHandler( 44 OfflineAudioDestinationHandler::OfflineAudioDestinationHandler(
45 AudioNode& node, 45 AudioNode& node,
46 AudioBuffer* renderTarget) 46 AudioBuffer* renderTarget)
47 : AudioDestinationHandler(node, renderTarget->sampleRate()), 47 : AudioDestinationHandler(node),
48 m_renderTarget(renderTarget), 48 m_renderTarget(renderTarget),
49 m_renderThread(WTF::wrapUnique( 49 m_renderThread(WTF::wrapUnique(
50 Platform::current()->createThread("offline audio renderer"))), 50 Platform::current()->createThread("offline audio renderer"))),
51 m_framesProcessed(0), 51 m_framesProcessed(0),
52 m_framesToProcess(0), 52 m_framesToProcess(0),
53 m_isRenderingStarted(false), 53 m_isRenderingStarted(false),
54 m_shouldSuspend(false) { 54 m_shouldSuspend(false) {
55 m_renderBus = AudioBus::create(renderTarget->numberOfChannels(), 55 m_renderBus = AudioBus::create(renderTarget->numberOfChannels(),
56 AudioUtilities::kRenderQuantumFrames); 56 AudioUtilities::kRenderQuantumFrames);
57 m_framesToProcess = m_renderTarget->length(); 57 m_framesToProcess = m_renderTarget->length();
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 setHandler(OfflineAudioDestinationHandler::create(*this, renderTarget)); 336 setHandler(OfflineAudioDestinationHandler::create(*this, renderTarget));
337 } 337 }
338 338
339 OfflineAudioDestinationNode* OfflineAudioDestinationNode::create( 339 OfflineAudioDestinationNode* OfflineAudioDestinationNode::create(
340 BaseAudioContext* context, 340 BaseAudioContext* context,
341 AudioBuffer* renderTarget) { 341 AudioBuffer* renderTarget) {
342 return new OfflineAudioDestinationNode(*context, renderTarget); 342 return new OfflineAudioDestinationNode(*context, renderTarget);
343 } 343 }
344 344
345 } // namespace blink 345 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698