OLD | NEW |
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 , m_framesProcessed(0) | 46 , m_framesProcessed(0) |
47 , m_framesToProcess(0) | 47 , m_framesToProcess(0) |
48 , m_isRenderingStarted(false) | 48 , m_isRenderingStarted(false) |
49 , m_shouldSuspend(false) | 49 , m_shouldSuspend(false) |
50 { | 50 { |
51 m_renderBus = AudioBus::create(renderTarget->numberOfChannels(), renderQuant
umSize); | 51 m_renderBus = AudioBus::create(renderTarget->numberOfChannels(), renderQuant
umSize); |
52 m_framesToProcess = m_renderTarget->length(); | 52 m_framesToProcess = m_renderTarget->length(); |
53 | 53 |
54 // Node-specific defaults. | 54 // Node-specific defaults. |
55 m_channelCount = m_renderTarget->numberOfChannels(); | 55 m_channelCount = m_renderTarget->numberOfChannels(); |
56 setInternalChannelCountMode(Explicit); | 56 m_channelCountMode = Explicit; |
57 setInternalChannelInterpretation(AudioBus::Speakers); | 57 m_channelInterpretation = AudioBus::Speakers; |
58 } | 58 } |
59 | 59 |
60 PassRefPtr<OfflineAudioDestinationHandler> OfflineAudioDestinationHandler::creat
e(AudioNode& node, AudioBuffer* renderTarget) | 60 PassRefPtr<OfflineAudioDestinationHandler> OfflineAudioDestinationHandler::creat
e(AudioNode& node, AudioBuffer* renderTarget) |
61 { | 61 { |
62 return adoptRef(new OfflineAudioDestinationHandler(node, renderTarget)); | 62 return adoptRef(new OfflineAudioDestinationHandler(node, renderTarget)); |
63 } | 63 } |
64 | 64 |
65 OfflineAudioDestinationHandler::~OfflineAudioDestinationHandler() | 65 OfflineAudioDestinationHandler::~OfflineAudioDestinationHandler() |
66 { | 66 { |
67 DCHECK(!isInitialized()); | 67 DCHECK(!isInitialized()); |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 { | 319 { |
320 setHandler(OfflineAudioDestinationHandler::create(*this, renderTarget)); | 320 setHandler(OfflineAudioDestinationHandler::create(*this, renderTarget)); |
321 } | 321 } |
322 | 322 |
323 OfflineAudioDestinationNode* OfflineAudioDestinationNode::create(BaseAudioContex
t* context, AudioBuffer* renderTarget) | 323 OfflineAudioDestinationNode* OfflineAudioDestinationNode::create(BaseAudioContex
t* context, AudioBuffer* renderTarget) |
324 { | 324 { |
325 return new OfflineAudioDestinationNode(*context, renderTarget); | 325 return new OfflineAudioDestinationNode(*context, renderTarget); |
326 } | 326 } |
327 | 327 |
328 } // namespace blink | 328 } // namespace blink |
OLD | NEW |