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

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

Issue 2846843002: [blink] Unique pointers in Platform.h (Closed)
Patch Set: fix compilation (and again) Created 3 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 #include "platform/wtf/PtrUtil.h" 39 #include "platform/wtf/PtrUtil.h"
40 #include "public/platform/Platform.h" 40 #include "public/platform/Platform.h"
41 41
42 namespace blink { 42 namespace blink {
43 43
44 OfflineAudioDestinationHandler::OfflineAudioDestinationHandler( 44 OfflineAudioDestinationHandler::OfflineAudioDestinationHandler(
45 AudioNode& node, 45 AudioNode& node,
46 AudioBuffer* render_target) 46 AudioBuffer* render_target)
47 : AudioDestinationHandler(node), 47 : AudioDestinationHandler(node),
48 render_target_(render_target), 48 render_target_(render_target),
49 render_thread_(WTF::WrapUnique( 49 render_thread_(
50 Platform::Current()->CreateThread("offline audio renderer"))), 50 Platform::Current()->CreateThread("offline audio renderer")),
51 frames_processed_(0), 51 frames_processed_(0),
52 frames_to_process_(0), 52 frames_to_process_(0),
53 is_rendering_started_(false), 53 is_rendering_started_(false),
54 should_suspend_(false) { 54 should_suspend_(false) {
55 render_bus_ = AudioBus::Create(render_target->numberOfChannels(), 55 render_bus_ = AudioBus::Create(render_target->numberOfChannels(),
56 AudioUtilities::kRenderQuantumFrames); 56 AudioUtilities::kRenderQuantumFrames);
57 frames_to_process_ = render_target_->length(); 57 frames_to_process_ = render_target_->length();
58 58
59 // Node-specific defaults. 59 // Node-specific defaults.
60 channel_count_ = render_target_->numberOfChannels(); 60 channel_count_ = render_target_->numberOfChannels();
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 SetHandler(OfflineAudioDestinationHandler::Create(*this, render_target)); 341 SetHandler(OfflineAudioDestinationHandler::Create(*this, render_target));
342 } 342 }
343 343
344 OfflineAudioDestinationNode* OfflineAudioDestinationNode::Create( 344 OfflineAudioDestinationNode* OfflineAudioDestinationNode::Create(
345 BaseAudioContext* context, 345 BaseAudioContext* context,
346 AudioBuffer* render_target) { 346 AudioBuffer* render_target) {
347 return new OfflineAudioDestinationNode(*context, render_target); 347 return new OfflineAudioDestinationNode(*context, render_target);
348 } 348 }
349 349
350 } // namespace blink 350 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698