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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 241 |
242 // Reconcile ref/deref which are defined both in ThreadSafeRefCounted and Ev
entTarget. | 242 // Reconcile ref/deref which are defined both in ThreadSafeRefCounted and Ev
entTarget. |
243 using ThreadSafeRefCounted<AudioContext>::ref; | 243 using ThreadSafeRefCounted<AudioContext>::ref; |
244 using ThreadSafeRefCounted<AudioContext>::deref; | 244 using ThreadSafeRefCounted<AudioContext>::deref; |
245 | 245 |
246 void startRendering(); | 246 void startRendering(); |
247 void fireCompletionEvent(); | 247 void fireCompletionEvent(); |
248 | 248 |
249 static unsigned s_hardwareContextCount; | 249 static unsigned s_hardwareContextCount; |
250 | 250 |
251 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; | |
252 | |
253 protected: | 251 protected: |
254 explicit AudioContext(Document*); | 252 explicit AudioContext(Document*); |
255 AudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, fl
oat sampleRate); | 253 AudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, fl
oat sampleRate); |
256 | 254 |
257 static bool isSampleRateRangeGood(float sampleRate); | 255 static bool isSampleRateRangeGood(float sampleRate); |
258 | 256 |
259 private: | 257 private: |
260 void constructCommon(); | 258 void constructCommon(); |
261 | 259 |
262 void lazyInitialize(); | 260 void lazyInitialize(); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 // It is somewhat arbitrary and could be increased if necessary. | 346 // It is somewhat arbitrary and could be increased if necessary. |
349 enum { MaxNumberOfChannels = 32 }; | 347 enum { MaxNumberOfChannels = 32 }; |
350 | 348 |
351 // Number of AudioBufferSourceNodes that are active (playing). | 349 // Number of AudioBufferSourceNodes that are active (playing). |
352 int m_activeSourceCount; | 350 int m_activeSourceCount; |
353 }; | 351 }; |
354 | 352 |
355 } // WebCore | 353 } // WebCore |
356 | 354 |
357 #endif // AudioContext_h | 355 #endif // AudioContext_h |
OLD | NEW |