| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 // Granular playback | 124 // Granular playback |
| 125 bool m_isGrain; | 125 bool m_isGrain; |
| 126 double m_grainOffset; // in seconds | 126 double m_grainOffset; // in seconds |
| 127 double m_grainDuration; // in seconds | 127 double m_grainDuration; // in seconds |
| 128 | 128 |
| 129 // totalPitchRate() returns the instantaneous pitch rate (non-time preservin
g). | 129 // totalPitchRate() returns the instantaneous pitch rate (non-time preservin
g). |
| 130 // It incorporates the base pitch rate, any sample-rate conversion factor fr
om the buffer, and any doppler shift from an associated panner node. | 130 // It incorporates the base pitch rate, any sample-rate conversion factor fr
om the buffer, and any doppler shift from an associated panner node. |
| 131 double totalPitchRate(); | 131 double totalPitchRate(); |
| 132 | 132 |
| 133 // We optionally keep track of a panner node which has a doppler shift that
is incorporated into | 133 // We optionally keep track of a panner node which has a doppler shift that |
| 134 // the pitch rate. We manually manage ref-counting because we want to use Re
fTypeConnection. | 134 // is incorporated into the pitch rate. |
| 135 PannerNode* m_pannerNode; | 135 // This RefPtr is connection reference. We must call AudioNode:: |
| 136 // makeConnection() after ref(), and call AudioNode::breakConnection() |
| 137 // before deref(). |
| 138 RefPtr<PannerNode> m_pannerNode; |
| 136 | 139 |
| 137 // This synchronizes process() with setBuffer() which can cause dynamic chan
nel count changes. | 140 // This synchronizes process() with setBuffer() which can cause dynamic chan
nel count changes. |
| 138 mutable Mutex m_processLock; | 141 mutable Mutex m_processLock; |
| 139 }; | 142 }; |
| 140 | 143 |
| 141 } // namespace WebCore | 144 } // namespace WebCore |
| 142 | 145 |
| 143 #endif // AudioBufferSourceNode_h | 146 #endif // AudioBufferSourceNode_h |
| OLD | NEW |