Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 19 matching lines...) Expand all Loading... | |
| 30 namespace blink { | 30 namespace blink { |
| 31 | 31 |
| 32 class WebAudioSourceProviderClient; | 32 class WebAudioSourceProviderClient; |
| 33 | 33 |
| 34 // Abstract interface for a pull-model client. | 34 // Abstract interface for a pull-model client. |
| 35 class WebAudioSourceProvider { | 35 class WebAudioSourceProvider { |
| 36 public: | 36 public: |
| 37 virtual ~WebAudioSourceProvider() {} | 37 virtual ~WebAudioSourceProvider() {} |
| 38 | 38 |
| 39 // provideInput() gets called repeatedly to render time-slices of a continuous | 39 // provideInput() gets called repeatedly to render time-slices of a continuous |
| 40 // audio stream. | 40 // audio stream. May be called from any thread. |
| 41 virtual void provideInput(const WebVector<float*>& audioData, | 41 virtual void provideInput(const WebVector<float*>& audioData, |
| 42 size_t numberOfFrames) = 0; | 42 size_t numberOfFrames) = 0; |
| 43 | 43 |
| 44 // If a client is set, we call it back when the audio format is available. | 44 // If a client is set, we call it back when the audio format is available. |
| 45 // Must always be called from the same thread. | |
|
Raymond Toy
2016/11/29 19:17:12
"same thread" as what?
DaleCurtis
2016/11/29 19:21:40
I.e. if you're on t0 and call setClient(), all fut
Raymond Toy
2016/11/29 19:23:50
I think that's a perfect comment. "All future call
DaleCurtis
2016/11/29 19:30:22
Done.
| |
| 45 virtual void setClient(WebAudioSourceProviderClient*) {} | 46 virtual void setClient(WebAudioSourceProviderClient*) {} |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 } // namespace blink | 49 } // namespace blink |
| 49 | 50 |
| 50 #endif // WebAudioSourceProvider_h | 51 #endif // WebAudioSourceProvider_h |
| OLD | NEW |