| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 protected: | 68 protected: |
| 69 // LocalAudioInputProvider allows us to expose an AudioSourceProvider for | 69 // LocalAudioInputProvider allows us to expose an AudioSourceProvider for |
| 70 // local/live audio input. If there is local/live audio input, we call set() | 70 // local/live audio input. If there is local/live audio input, we call set() |
| 71 // with the audio input data every render quantum. | 71 // with the audio input data every render quantum. |
| 72 class LocalAudioInputProvider final : public AudioSourceProvider { | 72 class LocalAudioInputProvider final : public AudioSourceProvider { |
| 73 public: | 73 public: |
| 74 LocalAudioInputProvider() | 74 LocalAudioInputProvider() |
| 75 : m_sourceBus(AudioBus::create( | 75 : m_sourceBus(AudioBus::create( |
| 76 2, | 76 2, |
| 77 ProcessingSizeInFrames)) // FIXME: handle non-stereo local input. | 77 AudioUtilities::kRenderQuantumFrames)) // FIXME: handle |
| 78 // non-stereo local input. |
| 78 {} | 79 {} |
| 79 | 80 |
| 80 void set(AudioBus* bus) { | 81 void set(AudioBus* bus) { |
| 81 if (bus) | 82 if (bus) |
| 82 m_sourceBus->copyFrom(*bus); | 83 m_sourceBus->copyFrom(*bus); |
| 83 } | 84 } |
| 84 | 85 |
| 85 // AudioSourceProvider. | 86 // AudioSourceProvider. |
| 86 void provideInput(AudioBus* destinationBus, | 87 void provideInput(AudioBus* destinationBus, |
| 87 size_t numberOfFrames) override { | 88 size_t numberOfFrames) override { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 111 | 112 |
| 112 unsigned long maxChannelCount() const; | 113 unsigned long maxChannelCount() const; |
| 113 | 114 |
| 114 protected: | 115 protected: |
| 115 AudioDestinationNode(BaseAudioContext&); | 116 AudioDestinationNode(BaseAudioContext&); |
| 116 }; | 117 }; |
| 117 | 118 |
| 118 } // namespace blink | 119 } // namespace blink |
| 119 | 120 |
| 120 #endif // AudioDestinationNode_h | 121 #endif // AudioDestinationNode_h |
| OLD | NEW |