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 | 39 |
40 namespace blink { | 40 namespace blink { |
| 41 |
41 class WebAudioSourceProvider; | 42 class WebAudioSourceProvider; |
42 } | |
43 | |
44 namespace blink { | |
45 | 43 |
46 class MediaStreamWebAudioSource : public AudioSourceProvider { | 44 class MediaStreamWebAudioSource : public AudioSourceProvider { |
47 WTF_MAKE_NONCOPYABLE(MediaStreamWebAudioSource); | 45 WTF_MAKE_NONCOPYABLE(MediaStreamWebAudioSource); |
48 public: | 46 public: |
49 static PassOwnPtr<MediaStreamWebAudioSource> create(PassOwnPtr<blink::WebAud
ioSourceProvider> provider) { return adoptPtr(new MediaStreamWebAudioSource(prov
ider)); } | 47 static PassOwnPtr<MediaStreamWebAudioSource> create(PassOwnPtr<WebAudioSourc
eProvider> provider) { return adoptPtr(new MediaStreamWebAudioSource(provider));
} |
50 | 48 |
51 virtual ~MediaStreamWebAudioSource(); | 49 virtual ~MediaStreamWebAudioSource(); |
52 | 50 |
53 private: | 51 private: |
54 explicit MediaStreamWebAudioSource(PassOwnPtr<blink::WebAudioSourceProvider>
); | 52 explicit MediaStreamWebAudioSource(PassOwnPtr<WebAudioSourceProvider>); |
55 | 53 |
56 // blink::AudioSourceProvider implementation. | 54 // blink::AudioSourceProvider implementation. |
57 virtual void provideInput(blink::AudioBus*, size_t framesToProcess) OVERRIDE
; | 55 virtual void provideInput(blink::AudioBus*, size_t framesToProcess) OVERRIDE
; |
58 | 56 |
59 OwnPtr<blink::WebAudioSourceProvider> m_webAudioSourceProvider; | 57 OwnPtr<WebAudioSourceProvider> m_webAudioSourceProvider; |
60 }; | 58 }; |
61 | 59 |
62 } // namespace blink | 60 } // namespace blink |
63 | 61 |
64 #endif // MediaStreamWebAudioSource_h | 62 #endif // MediaStreamWebAudioSource_h |
OLD | NEW |