OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. All rights reserved. | 2 * Copyright 2014 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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 20 matching lines...) Expand all Loading... |
31 #ifndef MediaStreamWebAudioSource_h | 31 #ifndef MediaStreamWebAudioSource_h |
32 #define MediaStreamWebAudioSource_h | 32 #define MediaStreamWebAudioSource_h |
33 | 33 |
34 #include "platform/audio/AudioSourceProvider.h" | 34 #include "platform/audio/AudioSourceProvider.h" |
35 #include "wtf/Noncopyable.h" | 35 #include "wtf/Noncopyable.h" |
36 #include "wtf/OwnPtr.h" | 36 #include "wtf/OwnPtr.h" |
37 #include "wtf/PassOwnPtr.h" | 37 #include "wtf/PassOwnPtr.h" |
38 #include "wtf/ThreadingPrimitives.h" | 38 #include "wtf/ThreadingPrimitives.h" |
39 #include "wtf/build_config.h" | 39 #include "wtf/build_config.h" |
40 | 40 |
41 #if ENABLE(WEB_AUDIO) | |
42 | |
43 namespace blink { | 41 namespace blink { |
44 | 42 |
45 class WebAudioSourceProvider; | 43 class WebAudioSourceProvider; |
46 | 44 |
47 class MediaStreamWebAudioSource : public AudioSourceProvider { | 45 class MediaStreamWebAudioSource : public AudioSourceProvider { |
48 WTF_MAKE_NONCOPYABLE(MediaStreamWebAudioSource); | 46 WTF_MAKE_NONCOPYABLE(MediaStreamWebAudioSource); |
49 public: | 47 public: |
50 static PassOwnPtr<MediaStreamWebAudioSource> create(PassOwnPtr<WebAudioSourc
eProvider> provider) { return adoptPtr(new MediaStreamWebAudioSource(std::move(p
rovider))); } | 48 static PassOwnPtr<MediaStreamWebAudioSource> create(PassOwnPtr<WebAudioSourc
eProvider> provider) { return adoptPtr(new MediaStreamWebAudioSource(std::move(p
rovider))); } |
51 | 49 |
52 ~MediaStreamWebAudioSource() override; | 50 ~MediaStreamWebAudioSource() override; |
53 | 51 |
54 private: | 52 private: |
55 explicit MediaStreamWebAudioSource(PassOwnPtr<WebAudioSourceProvider>); | 53 explicit MediaStreamWebAudioSource(PassOwnPtr<WebAudioSourceProvider>); |
56 | 54 |
57 // blink::AudioSourceProvider implementation. | 55 // blink::AudioSourceProvider implementation. |
58 void provideInput(AudioBus*, size_t framesToProcess) override; | 56 void provideInput(AudioBus*, size_t framesToProcess) override; |
59 | 57 |
60 OwnPtr<WebAudioSourceProvider> m_webAudioSourceProvider; | 58 OwnPtr<WebAudioSourceProvider> m_webAudioSourceProvider; |
61 }; | 59 }; |
62 | 60 |
63 } // namespace blink | 61 } // namespace blink |
64 | 62 |
65 #endif // ENABLE(WEB_AUDIO) | |
66 | |
67 #endif // MediaStreamWebAudioSource_h | 63 #endif // MediaStreamWebAudioSource_h |
OLD | NEW |