| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 // AudioHandler | 45 // AudioHandler |
| 46 void process(size_t) final { | 46 void process(size_t) final { |
| 47 } // we're pulled by hardware so this is never called | 47 } // we're pulled by hardware so this is never called |
| 48 | 48 |
| 49 // The audio hardware calls render() to get the next render quantum of audio | 49 // The audio hardware calls render() to get the next render quantum of audio |
| 50 // into destinationBus. It will optionally give us local/live audio input in | 50 // into destinationBus. It will optionally give us local/live audio input in |
| 51 // sourceBus (if it's not 0). | 51 // sourceBus (if it's not 0). |
| 52 void render(AudioBus* sourceBus, | 52 void render(AudioBus* sourceBus, |
| 53 AudioBus* destinationBus, | 53 AudioBus* destinationBus, |
| 54 size_t numberOfFrames) final; | 54 size_t numberOfFrames, |
| 55 const AudioIOPosition& outputPosition) final; |
| 55 | 56 |
| 56 size_t currentSampleFrame() const { | 57 size_t currentSampleFrame() const { |
| 57 return acquireLoad(&m_currentSampleFrame); | 58 return acquireLoad(&m_currentSampleFrame); |
| 58 } | 59 } |
| 59 double currentTime() const { | 60 double currentTime() const { |
| 60 return currentSampleFrame() / static_cast<double>(sampleRate()); | 61 return currentSampleFrame() / static_cast<double>(sampleRate()); |
| 61 } | 62 } |
| 62 | 63 |
| 63 virtual unsigned long maxChannelCount() const { return 0; } | 64 virtual unsigned long maxChannelCount() const { return 0; } |
| 64 | 65 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |