Chromium Code Reviews| 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 28 matching lines...) Expand all Loading... | |
| 39 | 39 |
| 40 class MediaStreamAudioDestinationHandler final : public AudioBasicInspectorHandl er { | 40 class MediaStreamAudioDestinationHandler final : public AudioBasicInspectorHandl er { |
| 41 public: | 41 public: |
| 42 static PassRefPtr<MediaStreamAudioDestinationHandler> create(AudioNode&, siz e_t numberOfChannels); | 42 static PassRefPtr<MediaStreamAudioDestinationHandler> create(AudioNode&, siz e_t numberOfChannels); |
| 43 ~MediaStreamAudioDestinationHandler() override; | 43 ~MediaStreamAudioDestinationHandler() override; |
| 44 | 44 |
| 45 MediaStream* stream() { return m_stream.get(); } | 45 MediaStream* stream() { return m_stream.get(); } |
| 46 | 46 |
| 47 // AudioHandler. | 47 // AudioHandler. |
| 48 void process(size_t framesToProcess) override; | 48 void process(size_t framesToProcess) override; |
| 49 void setChannelCount(unsigned long, ExceptionState&) override; | |
| 50 | |
| 51 unsigned long maxChannelCount() const; | |
| 49 | 52 |
| 50 private: | 53 private: |
| 51 MediaStreamAudioDestinationHandler(AudioNode&, size_t numberOfChannels); | 54 MediaStreamAudioDestinationHandler(AudioNode&, size_t numberOfChannels); |
| 52 // As an audio source, we will never propagate silence. | 55 // As an audio source, we will never propagate silence. |
| 53 bool propagatesSilence() const override { return false; } | 56 bool propagatesSilence() const override { return false; } |
| 54 | 57 |
| 55 // This Persistent doesn't make a reference cycle. | 58 // This Persistent doesn't make a reference cycle. |
| 56 Persistent<MediaStream> m_stream; | 59 Persistent<MediaStream> m_stream; |
| 57 Persistent<MediaStreamSource> m_source; | 60 Persistent<MediaStreamSource> m_source; |
| 61 | |
| 62 // This internal mix bus functions as a up/down mixing buffer. | |
|
Raymond Toy
2015/11/20 14:47:19
This isn't quite descriptive enough. I think it sh
hongchan
2015/11/20 18:02:59
Done.
| |
| 58 RefPtr<AudioBus> m_mixBus; | 63 RefPtr<AudioBus> m_mixBus; |
| 59 }; | 64 }; |
| 60 | 65 |
| 61 class MediaStreamAudioDestinationNode final : public AudioBasicInspectorNode { | 66 class MediaStreamAudioDestinationNode final : public AudioBasicInspectorNode { |
| 62 DEFINE_WRAPPERTYPEINFO(); | 67 DEFINE_WRAPPERTYPEINFO(); |
| 63 public: | 68 public: |
| 64 static MediaStreamAudioDestinationNode* create(AbstractAudioContext&, size_t numberOfChannels); | 69 static MediaStreamAudioDestinationNode* create(AbstractAudioContext&, size_t numberOfChannels); |
| 65 MediaStream* stream() const; | 70 MediaStream* stream() const; |
| 66 | 71 |
| 67 private: | 72 private: |
| 68 MediaStreamAudioDestinationNode(AbstractAudioContext&, size_t numberOfChanne ls); | 73 MediaStreamAudioDestinationNode(AbstractAudioContext&, size_t numberOfChanne ls); |
| 69 }; | 74 }; |
| 70 | 75 |
| 71 } // namespace blink | 76 } // namespace blink |
| 72 | 77 |
| 73 #endif // ENABLE(WEB_AUDIO) | 78 #endif // ENABLE(WEB_AUDIO) |
| 74 | 79 |
| 75 #endif // MediaStreamAudioDestinationNode_h | 80 #endif // MediaStreamAudioDestinationNode_h |
| OLD | NEW |