| 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 |
| 273 // Output timestamp to be set from destination handler. |
| 274 void setWebAudioTimestamp(const WebAudioTimestamp&); |
| 275 |
| 270 protected: | 276 protected: |
| 271 explicit AbstractAudioContext(Document*); | 277 explicit AbstractAudioContext(Document*); |
| 272 AbstractAudioContext(Document*, unsigned numberOfChannels, size_t numberOfFr
ames, float sampleRate); | 278 AbstractAudioContext(Document*, unsigned numberOfChannels, size_t numberOfFr
ames, float sampleRate); |
| 273 | 279 |
| 274 void initialize(); | 280 void initialize(); |
| 275 void uninitialize(); | 281 void uninitialize(); |
| 276 | 282 |
| 277 void setContextState(AudioContextState); | 283 void setContextState(AudioContextState); |
| 278 | 284 |
| 279 virtual void didClose() {} | 285 virtual void didClose() {} |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 // they can be shared with all OscillatorNodes in the context. To conserve
memory, these are | 374 // they can be shared with all OscillatorNodes in the context. To conserve
memory, these are |
| 369 // lazily initiialized on first use. | 375 // lazily initiialized on first use. |
| 370 Member<PeriodicWave> m_periodicWaveSine; | 376 Member<PeriodicWave> m_periodicWaveSine; |
| 371 Member<PeriodicWave> m_periodicWaveSquare; | 377 Member<PeriodicWave> m_periodicWaveSquare; |
| 372 Member<PeriodicWave> m_periodicWaveSawtooth; | 378 Member<PeriodicWave> m_periodicWaveSawtooth; |
| 373 Member<PeriodicWave> m_periodicWaveTriangle; | 379 Member<PeriodicWave> m_periodicWaveTriangle; |
| 374 | 380 |
| 375 // This is considering 32 is large enough for multiple channels audio. | 381 // This is considering 32 is large enough for multiple channels audio. |
| 376 // It is somewhat arbitrary and could be increased if necessary. | 382 // It is somewhat arbitrary and could be increased if necessary. |
| 377 enum { MaxNumberOfChannels = 32 }; | 383 enum { MaxNumberOfChannels = 32 }; |
| 384 |
| 385 // Output audio stream timestamp. |
| 386 WebAudioTimestamp m_outputTimestamp; |
| 378 }; | 387 }; |
| 379 | 388 |
| 380 } // namespace blink | 389 } // namespace blink |
| 381 | 390 |
| 382 #endif // AbstractAudioContext_h | 391 #endif // AbstractAudioContext_h |
| OLD | NEW |