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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 // Oilpan: This Vector holds connection references. We must call | 313 // Oilpan: This Vector holds connection references. We must call |
314 // AudioHandler::makeConnection when we add an AudioNode to this, and must | 314 // AudioHandler::makeConnection when we add an AudioNode to this, and must |
315 // call AudioHandler::breakConnection() when we remove an AudioNode from | 315 // call AudioHandler::breakConnection() when we remove an AudioNode from |
316 // this. | 316 // this. |
317 HeapVector<Member<AudioNode>> m_activeSourceNodes; | 317 HeapVector<Member<AudioNode>> m_activeSourceNodes; |
318 | 318 |
319 // The main thread controls m_activeSourceNodes, all updates and additions | 319 // The main thread controls m_activeSourceNodes, all updates and additions |
320 // are performed by it. When the audio thread marks a source node as finishe
d, | 320 // are performed by it. When the audio thread marks a source node as finishe
d, |
321 // the nodes are added to |m_finishedSourceNodes| and scheduled for removal | 321 // the nodes are added to |m_finishedSourceNodes| and scheduled for removal |
322 // from |m_activeSourceNodes| by the main thread. | 322 // from |m_activeSourceNodes| by the main thread. |
323 Vector<UntracedMember<AudioNode>> m_finishedSourceNodes; | 323 HashSet<UntracedMember<AudioNode>> m_finishedSourceNodes; |
324 | 324 |
325 // FIXME(dominicc): Move these to AudioContext because only | 325 // FIXME(dominicc): Move these to AudioContext because only |
326 // it creates these Promises. | 326 // it creates these Promises. |
327 // Handle Promises for resume() and suspend() | 327 // Handle Promises for resume() and suspend() |
328 void resolvePromisesForResume(); | 328 void resolvePromisesForResume(); |
329 void resolvePromisesForResumeOnMainThread(); | 329 void resolvePromisesForResumeOnMainThread(); |
330 | 330 |
331 // When the context is going away, reject any pending script promise resolve
rs. | 331 // When the context is going away, reject any pending script promise resolve
rs. |
332 virtual void rejectPendingResolvers(); | 332 virtual void rejectPendingResolvers(); |
333 | 333 |
(...skipping 30 matching lines...) Expand all Loading... |
364 Member<PeriodicWave> m_periodicWaveTriangle; | 364 Member<PeriodicWave> m_periodicWaveTriangle; |
365 | 365 |
366 // This is considering 32 is large enough for multiple channels audio. | 366 // This is considering 32 is large enough for multiple channels audio. |
367 // It is somewhat arbitrary and could be increased if necessary. | 367 // It is somewhat arbitrary and could be increased if necessary. |
368 enum { MaxNumberOfChannels = 32 }; | 368 enum { MaxNumberOfChannels = 32 }; |
369 }; | 369 }; |
370 | 370 |
371 } // namespace blink | 371 } // namespace blink |
372 | 372 |
373 #endif // AbstractAudioContext_h | 373 #endif // AbstractAudioContext_h |
OLD | NEW |