| 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 * | 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 24 matching lines...) Expand all Loading... |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 // Abstract interface to the Chromium audio system. | 37 // Abstract interface to the Chromium audio system. |
| 38 | 38 |
| 39 class WebAudioDevice { | 39 class WebAudioDevice { |
| 40 public: | 40 public: |
| 41 class BLINK_PLATFORM_EXPORT RenderCallback { | 41 class BLINK_PLATFORM_EXPORT RenderCallback { |
| 42 public: | 42 public: |
| 43 virtual void render(const WebVector<float*>& sourceData, | 43 virtual void render(const WebVector<float*>& sourceData, |
| 44 const WebVector<float*>& destinationData, | 44 const WebVector<float*>& destinationData, |
| 45 size_t numberOfFrames); | 45 size_t numberOfFrames, |
| 46 double delay, |
| 47 double delayTimestamp, |
| 48 size_t priorFramesSkipped); |
| 46 | 49 |
| 47 protected: | 50 protected: |
| 48 virtual ~RenderCallback(); | 51 virtual ~RenderCallback(); |
| 49 }; | 52 }; |
| 50 | 53 |
| 51 virtual ~WebAudioDevice() {} | 54 virtual ~WebAudioDevice() {} |
| 52 | 55 |
| 53 virtual void start() = 0; | 56 virtual void start() = 0; |
| 54 virtual void stop() = 0; | 57 virtual void stop() = 0; |
| 55 virtual double sampleRate() = 0; | 58 virtual double sampleRate() = 0; |
| 56 }; | 59 }; |
| 57 | 60 |
| 58 } // namespace blink | 61 } // namespace blink |
| 59 | 62 |
| 60 #endif // WebAudioDevice_h | 63 #endif // WebAudioDevice_h |
| OLD | NEW |