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

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

Issue 14628008: Require use of AudioBus::create() to avoid ref-counting issues (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Require use of Created 7 years, 7 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 28 matching lines...) Expand all
39 namespace WebCore { 39 namespace WebCore {
40 40
41 const size_t renderQuantumSize = 128; 41 const size_t renderQuantumSize = 128;
42 42
43 OfflineAudioDestinationNode::OfflineAudioDestinationNode(AudioContext* context, AudioBuffer* renderTarget) 43 OfflineAudioDestinationNode::OfflineAudioDestinationNode(AudioContext* context, AudioBuffer* renderTarget)
44 : AudioDestinationNode(context, renderTarget->sampleRate()) 44 : AudioDestinationNode(context, renderTarget->sampleRate())
45 , m_renderTarget(renderTarget) 45 , m_renderTarget(renderTarget)
46 , m_renderThread(0) 46 , m_renderThread(0)
47 , m_startedRendering(false) 47 , m_startedRendering(false)
48 { 48 {
49 m_renderBus = adoptRef(new AudioBus(renderTarget->numberOfChannels(), render QuantumSize)); 49 m_renderBus = AudioBus::create(renderTarget->numberOfChannels(), renderQuant umSize);
50 } 50 }
51 51
52 OfflineAudioDestinationNode::~OfflineAudioDestinationNode() 52 OfflineAudioDestinationNode::~OfflineAudioDestinationNode()
53 { 53 {
54 uninitialize(); 54 uninitialize();
55 } 55 }
56 56
57 void OfflineAudioDestinationNode::initialize() 57 void OfflineAudioDestinationNode::initialize()
58 { 58 {
59 if (isInitialized()) 59 if (isInitialized())
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 162
163 void OfflineAudioDestinationNode::notifyComplete() 163 void OfflineAudioDestinationNode::notifyComplete()
164 { 164 {
165 context()->fireCompletionEvent(); 165 context()->fireCompletionEvent();
166 } 166 }
167 167
168 } // namespace WebCore 168 } // namespace WebCore
169 169
170 #endif // ENABLE(WEB_AUDIO) 170 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp ('k') | Source/modules/webaudio/ScriptProcessorNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698