| 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 void copyFromChannel(DOMFloat32Array*, long channelNumber, unsigned long sta
rtInChannel, ExceptionState&); | 64 void copyFromChannel(DOMFloat32Array*, long channelNumber, unsigned long sta
rtInChannel, ExceptionState&); |
| 65 void copyToChannel(DOMFloat32Array*, long channelNumber, ExceptionState&); | 65 void copyToChannel(DOMFloat32Array*, long channelNumber, ExceptionState&); |
| 66 void copyToChannel(DOMFloat32Array*, long channelNumber, unsigned long start
InChannel, ExceptionState&); | 66 void copyToChannel(DOMFloat32Array*, long channelNumber, unsigned long start
InChannel, ExceptionState&); |
| 67 | 67 |
| 68 void zero(); | 68 void zero(); |
| 69 | 69 |
| 70 DEFINE_INLINE_TRACE() { } | 70 DEFINE_INLINE_TRACE() { } |
| 71 | 71 |
| 72 virtual v8::Handle<v8::Object> associateWithWrapper(v8::Isolate*, const Wrap
perTypeInfo*, v8::Handle<v8::Object> wrapper) override; | 72 virtual v8::Handle<v8::Object> associateWithWrapper(v8::Isolate*, const Wrap
perTypeInfo*, v8::Handle<v8::Object> wrapper) override; |
| 73 | 73 |
| 74 private: |
| 75 static PassRefPtr<DOMFloat32Array> createFloat32ArrayOrNull(size_t length); |
| 76 |
| 74 protected: | 77 protected: |
| 75 AudioBuffer(unsigned numberOfChannels, size_t numberOfFrames, float sampleRa
te); | 78 AudioBuffer(unsigned numberOfChannels, size_t numberOfFrames, float sampleRa
te); |
| 76 explicit AudioBuffer(AudioBus*); | 79 explicit AudioBuffer(AudioBus*); |
| 77 bool createdSuccessfully(unsigned desiredNumberOfChannels) const; | 80 bool createdSuccessfully(unsigned desiredNumberOfChannels) const; |
| 78 | 81 |
| 79 float m_sampleRate; | 82 float m_sampleRate; |
| 80 size_t m_length; | 83 size_t m_length; |
| 81 | 84 |
| 82 Vector<RefPtr<DOMFloat32Array>> m_channels; | 85 Vector<RefPtr<DOMFloat32Array>> m_channels; |
| 83 }; | 86 }; |
| 84 | 87 |
| 85 } // namespace blink | 88 } // namespace blink |
| 86 | 89 |
| 87 #endif // AudioBuffer_h | 90 #endif // AudioBuffer_h |
| OLD | NEW |