| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 class ScriptPromiseResolver; | 78 class ScriptPromiseResolver; |
| 79 class ScriptState; | 79 class ScriptState; |
| 80 class SecurityOrigin; | 80 class SecurityOrigin; |
| 81 class StereoPannerNode; | 81 class StereoPannerNode; |
| 82 class WaveShaperNode; | 82 class WaveShaperNode; |
| 83 | 83 |
| 84 // BaseAudioContext is the cornerstone of the web audio API and all AudioNodes | 84 // BaseAudioContext is the cornerstone of the web audio API and all AudioNodes |
| 85 // are created from it. For thread safety between the audio thread and the main | 85 // are created from it. For thread safety between the audio thread and the main |
| 86 // thread, it has a rendering graph locking mechanism. | 86 // thread, it has a rendering graph locking mechanism. |
| 87 | 87 |
| 88 class MODULES_EXPORT BaseAudioContext : public EventTargetWithInlineData, | 88 class MODULES_EXPORT BaseAudioContext |
| 89 public ActiveScriptWrappable, | 89 : public EventTargetWithInlineData, |
| 90 public SuspendableObject { | 90 public ActiveScriptWrappable<BaseAudioContext>, |
| 91 public SuspendableObject { |
| 91 USING_GARBAGE_COLLECTED_MIXIN(BaseAudioContext); | 92 USING_GARBAGE_COLLECTED_MIXIN(BaseAudioContext); |
| 92 DEFINE_WRAPPERTYPEINFO(); | 93 DEFINE_WRAPPERTYPEINFO(); |
| 93 | 94 |
| 94 public: | 95 public: |
| 95 // The state of an audio context. On creation, the state is Suspended. The | 96 // The state of an audio context. On creation, the state is Suspended. The |
| 96 // state is Running if audio is being processed (audio graph is being pulled | 97 // state is Running if audio is being processed (audio graph is being pulled |
| 97 // for data). The state is Closed if the audio context has been closed. The | 98 // for data). The state is Closed if the audio context has been closed. The |
| 98 // valid transitions are from Suspended to either Running or Closed; Running | 99 // valid transitions are from Suspended to either Running or Closed; Running |
| 99 // to Suspended or Closed. Once Closed, there are no valid transitions. | 100 // to Suspended or Closed. Once Closed, there are no valid transitions. |
| 100 enum AudioContextState { Suspended, Running, Closed }; | 101 enum AudioContextState { Suspended, Running, Closed }; |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 // This is considering 32 is large enough for multiple channels audio. | 448 // This is considering 32 is large enough for multiple channels audio. |
| 448 // It is somewhat arbitrary and could be increased if necessary. | 449 // It is somewhat arbitrary and could be increased if necessary. |
| 449 enum { MaxNumberOfChannels = 32 }; | 450 enum { MaxNumberOfChannels = 32 }; |
| 450 | 451 |
| 451 Optional<AutoplayStatus> m_autoplayStatus; | 452 Optional<AutoplayStatus> m_autoplayStatus; |
| 452 }; | 453 }; |
| 453 | 454 |
| 454 } // namespace blink | 455 } // namespace blink |
| 455 | 456 |
| 456 #endif // BaseAudioContext_h | 457 #endif // BaseAudioContext_h |
| OLD | NEW |