| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 static OfflineAudioContext* create(ExecutionContext*, | 42 static OfflineAudioContext* create(ExecutionContext*, |
| 43 unsigned numberOfChannels, | 43 unsigned numberOfChannels, |
| 44 unsigned numberOfFrames, | 44 unsigned numberOfFrames, |
| 45 float sampleRate, | 45 float sampleRate, |
| 46 ExceptionState&); | 46 ExceptionState&); |
| 47 | 47 |
| 48 ~OfflineAudioContext() override; | 48 ~OfflineAudioContext() override; |
| 49 | 49 |
| 50 DECLARE_VIRTUAL_TRACE(); | 50 DECLARE_VIRTUAL_TRACE(); |
| 51 | 51 |
| 52 unsigned length() const { return m_totalRenderFrames; } | 52 size_t length() const { return m_totalRenderFrames; } |
| 53 | 53 |
| 54 ScriptPromise startOfflineRendering(ScriptState*); | 54 ScriptPromise startOfflineRendering(ScriptState*); |
| 55 | 55 |
| 56 ScriptPromise suspendContext(ScriptState*, double); | 56 ScriptPromise suspendContext(ScriptState*, double); |
| 57 ScriptPromise resumeContext(ScriptState*) final; | 57 ScriptPromise resumeContext(ScriptState*) final; |
| 58 | 58 |
| 59 // This is to implement the pure virtual method from BaseAudioContext. | 59 // This is to implement the pure virtual method from BaseAudioContext. |
| 60 // CANNOT be called from an OfflineAudioContext. | 60 // CANNOT be called from an OfflineAudioContext. |
| 61 ScriptPromise suspendContext(ScriptState*) final; | 61 ScriptPromise suspendContext(ScriptState*) final; |
| 62 | 62 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // state when the context is suspended. | 125 // state when the context is suspended. |
| 126 bool m_isRenderingStarted; | 126 bool m_isRenderingStarted; |
| 127 | 127 |
| 128 // Total render sample length. | 128 // Total render sample length. |
| 129 size_t m_totalRenderFrames; | 129 size_t m_totalRenderFrames; |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 } // namespace blink | 132 } // namespace blink |
| 133 | 133 |
| 134 #endif // OfflineAudioContext_h | 134 #endif // OfflineAudioContext_h |
| OLD | NEW |