| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 // this. | 275 // this. |
| 276 HeapVector<Member<AudioNode>> m_activeSourceNodes; | 276 HeapVector<Member<AudioNode>> m_activeSourceNodes; |
| 277 | 277 |
| 278 // Stop rendering the audio graph. | 278 // Stop rendering the audio graph. |
| 279 void stopRendering(); | 279 void stopRendering(); |
| 280 | 280 |
| 281 // Handle Promises for resume() and suspend() | 281 // Handle Promises for resume() and suspend() |
| 282 void resolvePromisesForResume(); | 282 void resolvePromisesForResume(); |
| 283 void resolvePromisesForResumeOnMainThread(); | 283 void resolvePromisesForResumeOnMainThread(); |
| 284 | 284 |
| 285 void resolvePromisesForSuspend(); | |
| 286 void resolvePromisesForSuspendOnMainThread(); | |
| 287 | |
| 288 // Vector of promises created by resume(). It takes time to handle them, so
we collect all of | 285 // Vector of promises created by resume(). It takes time to handle them, so
we collect all of |
| 289 // the promises here until they can be resolved or rejected. | 286 // the promises here until they can be resolved or rejected. |
| 290 WillBeHeapVector<RefPtrWillBeMember<ScriptPromiseResolver>> m_resumeResolver
s; | 287 WillBeHeapVector<RefPtrWillBeMember<ScriptPromiseResolver>> m_resumeResolver
s; |
| 291 // Like m_resumeResolvers but for suspend(). | |
| 292 WillBeHeapVector<RefPtrWillBeMember<ScriptPromiseResolver>> m_suspendResolve
rs; | |
| 293 void rejectPendingResolvers(); | 288 void rejectPendingResolvers(); |
| 294 | 289 |
| 295 // True if we're in the process of resolving promises for resume(). Resolvi
ng can take some | 290 // True if we're in the process of resolving promises for resume(). Resolvi
ng can take some |
| 296 // time and the audio context process loop is very fast, so we don't want to
call resolve an | 291 // time and the audio context process loop is very fast, so we don't want to
call resolve an |
| 297 // excessive number of times. | 292 // excessive number of times. |
| 298 bool m_isResolvingResumePromises; | 293 bool m_isResolvingResumePromises; |
| 299 | 294 |
| 300 unsigned m_connectionCount; | 295 unsigned m_connectionCount; |
| 301 | 296 |
| 302 // Graph locking. | 297 // Graph locking. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 327 // This is considering 32 is large enough for multiple channels audio. | 322 // This is considering 32 is large enough for multiple channels audio. |
| 328 // It is somewhat arbitrary and could be increased if necessary. | 323 // It is somewhat arbitrary and could be increased if necessary. |
| 329 enum { MaxNumberOfChannels = 32 }; | 324 enum { MaxNumberOfChannels = 32 }; |
| 330 | 325 |
| 331 unsigned m_contextId; | 326 unsigned m_contextId; |
| 332 }; | 327 }; |
| 333 | 328 |
| 334 } // namespace blink | 329 } // namespace blink |
| 335 | 330 |
| 336 #endif // AudioContext_h | 331 #endif // AudioContext_h |
| OLD | NEW |