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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 260 |
261 // Get the PeriodicWave for the specified oscillator type. The table is ini
tialized internally | 261 // Get the PeriodicWave for the specified oscillator type. The table is ini
tialized internally |
262 // if necessary. | 262 // if necessary. |
263 PeriodicWave* periodicWave(int type); | 263 PeriodicWave* periodicWave(int type); |
264 | 264 |
265 // Check whether the AudioContext requires a user gesture and whether the | 265 // Check whether the AudioContext requires a user gesture and whether the |
266 // current stack is processing user gesture and record these information in | 266 // current stack is processing user gesture and record these information in |
267 // a histogram. | 267 // a histogram. |
268 void recordUserGestureState(); | 268 void recordUserGestureState(); |
269 | 269 |
| 270 // Gets the audio timestamp of the currently audiable signal. |
| 271 void getOutputTimestamp(AudioTimestamp&); |
| 272 |
270 protected: | 273 protected: |
271 explicit AbstractAudioContext(Document*); | 274 explicit AbstractAudioContext(Document*); |
272 AbstractAudioContext(Document*, unsigned numberOfChannels, size_t numberOfFr
ames, float sampleRate); | 275 AbstractAudioContext(Document*, unsigned numberOfChannels, size_t numberOfFr
ames, float sampleRate); |
273 | 276 |
274 void initialize(); | 277 void initialize(); |
275 void uninitialize(); | 278 void uninitialize(); |
276 | 279 |
277 void setContextState(AudioContextState); | 280 void setContextState(AudioContextState); |
278 | 281 |
279 virtual void didClose() {} | 282 virtual void didClose() {} |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 Member<PeriodicWave> m_periodicWaveTriangle; | 376 Member<PeriodicWave> m_periodicWaveTriangle; |
374 | 377 |
375 // This is considering 32 is large enough for multiple channels audio. | 378 // This is considering 32 is large enough for multiple channels audio. |
376 // It is somewhat arbitrary and could be increased if necessary. | 379 // It is somewhat arbitrary and could be increased if necessary. |
377 enum { MaxNumberOfChannels = 32 }; | 380 enum { MaxNumberOfChannels = 32 }; |
378 }; | 381 }; |
379 | 382 |
380 } // namespace blink | 383 } // namespace blink |
381 | 384 |
382 #endif // AbstractAudioContext_h | 385 #endif // AbstractAudioContext_h |
OLD | NEW |