OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Ericsson AB. All rights reserved. | 2 * Copyright (C) 2011 Ericsson AB. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 #include "config.h" | 32 #include "config.h" |
33 | 33 |
34 #include "platform/mediastream/MediaStreamComponent.h" | 34 #include "platform/mediastream/MediaStreamComponent.h" |
35 | 35 |
36 #include "platform/UUID.h" | 36 #include "platform/UUID.h" |
37 #include "platform/audio/AudioBus.h" | 37 #include "platform/audio/AudioBus.h" |
38 #include "platform/mediastream/MediaStreamSource.h" | 38 #include "platform/mediastream/MediaStreamSource.h" |
39 #include "public/platform/WebAudioSourceProvider.h" | 39 #include "public/platform/WebAudioSourceProvider.h" |
40 | 40 |
41 namespace WebCore { | 41 namespace blink { |
42 | 42 |
43 PassRefPtr<MediaStreamComponent> MediaStreamComponent::create(PassRefPtr<MediaSt
reamSource> source) | 43 PassRefPtr<MediaStreamComponent> MediaStreamComponent::create(PassRefPtr<MediaSt
reamSource> source) |
44 { | 44 { |
45 return adoptRef(new MediaStreamComponent(createCanonicalUUIDString(), source
)); | 45 return adoptRef(new MediaStreamComponent(createCanonicalUUIDString(), source
)); |
46 } | 46 } |
47 | 47 |
48 PassRefPtr<MediaStreamComponent> MediaStreamComponent::create(const String& id,
PassRefPtr<MediaStreamSource> source) | 48 PassRefPtr<MediaStreamComponent> MediaStreamComponent::create(const String& id,
PassRefPtr<MediaStreamSource> source) |
49 { | 49 { |
50 return adoptRef(new MediaStreamComponent(id, source)); | 50 return adoptRef(new MediaStreamComponent(id, source)); |
51 } | 51 } |
(...skipping 29 matching lines...) Expand all Loading... |
81 // Wrap the AudioBus channel data using WebVector. | 81 // Wrap the AudioBus channel data using WebVector. |
82 size_t n = bus->numberOfChannels(); | 82 size_t n = bus->numberOfChannels(); |
83 blink::WebVector<float*> webAudioData(n); | 83 blink::WebVector<float*> webAudioData(n); |
84 for (size_t i = 0; i < n; ++i) | 84 for (size_t i = 0; i < n; ++i) |
85 webAudioData[i] = bus->channel(i)->mutableData(); | 85 webAudioData[i] = bus->channel(i)->mutableData(); |
86 | 86 |
87 m_webAudioSourceProvider->provideInput(webAudioData, framesToProcess); | 87 m_webAudioSourceProvider->provideInput(webAudioData, framesToProcess); |
88 } | 88 } |
89 #endif // #if ENABLE(WEB_AUDIO) | 89 #endif // #if ENABLE(WEB_AUDIO) |
90 | 90 |
91 } // namespace WebCore | 91 } // namespace blink |
92 | 92 |
OLD | NEW |