OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, 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 15 matching lines...) Expand all Loading... |
26 #if ENABLE(WEB_AUDIO) | 26 #if ENABLE(WEB_AUDIO) |
27 #include "modules/webaudio/MediaStreamAudioDestinationNode.h" | 27 #include "modules/webaudio/MediaStreamAudioDestinationNode.h" |
28 | 28 |
29 #include "modules/webaudio/AudioContext.h" | 29 #include "modules/webaudio/AudioContext.h" |
30 #include "modules/webaudio/AudioNodeInput.h" | 30 #include "modules/webaudio/AudioNodeInput.h" |
31 #include "platform/UUID.h" | 31 #include "platform/UUID.h" |
32 #include "platform/mediastream/MediaStreamCenter.h" | 32 #include "platform/mediastream/MediaStreamCenter.h" |
33 #include "public/platform/WebRTCPeerConnectionHandler.h" | 33 #include "public/platform/WebRTCPeerConnectionHandler.h" |
34 #include "wtf/Locker.h" | 34 #include "wtf/Locker.h" |
35 | 35 |
36 namespace WebCore { | 36 namespace blink { |
37 | 37 |
38 PassRefPtrWillBeRawPtr<MediaStreamAudioDestinationNode> MediaStreamAudioDestinat
ionNode::create(AudioContext* context, size_t numberOfChannels) | 38 PassRefPtrWillBeRawPtr<MediaStreamAudioDestinationNode> MediaStreamAudioDestinat
ionNode::create(AudioContext* context, size_t numberOfChannels) |
39 { | 39 { |
40 return adoptRefWillBeNoop(new MediaStreamAudioDestinationNode(context, numbe
rOfChannels)); | 40 return adoptRefWillBeNoop(new MediaStreamAudioDestinationNode(context, numbe
rOfChannels)); |
41 } | 41 } |
42 | 42 |
43 MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode(AudioContext* c
ontext, size_t numberOfChannels) | 43 MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode(AudioContext* c
ontext, size_t numberOfChannels) |
44 : AudioBasicInspectorNode(context, context->sampleRate(), numberOfChannels) | 44 : AudioBasicInspectorNode(context, context->sampleRate(), numberOfChannels) |
45 , m_mixBus(AudioBus::create(numberOfChannels, ProcessingSizeInFrames)) | 45 , m_mixBus(AudioBus::create(numberOfChannels, ProcessingSizeInFrames)) |
46 { | 46 { |
(...skipping 22 matching lines...) Expand all Loading... |
69 visitor->trace(m_stream); | 69 visitor->trace(m_stream); |
70 AudioBasicInspectorNode::trace(visitor); | 70 AudioBasicInspectorNode::trace(visitor); |
71 } | 71 } |
72 | 72 |
73 void MediaStreamAudioDestinationNode::process(size_t numberOfFrames) | 73 void MediaStreamAudioDestinationNode::process(size_t numberOfFrames) |
74 { | 74 { |
75 m_mixBus->copyFrom(*input(0)->bus()); | 75 m_mixBus->copyFrom(*input(0)->bus()); |
76 m_source->consumeAudio(m_mixBus.get(), numberOfFrames); | 76 m_source->consumeAudio(m_mixBus.get(), numberOfFrames); |
77 } | 77 } |
78 | 78 |
79 } // namespace WebCore | 79 } // namespace blink |
80 | 80 |
81 #endif // ENABLE(WEB_AUDIO) | 81 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |