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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 DOMFloat32Array* getChannelData(unsigned channelIndex); | 62 DOMFloat32Array* getChannelData(unsigned channelIndex); |
63 void copyFromChannel(DOMFloat32Array*, long channelNumber, ExceptionState&); | 63 void copyFromChannel(DOMFloat32Array*, long channelNumber, ExceptionState&); |
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::Local<v8::Object> associateWithWrapper(v8::Isolate*, const Wrapp
erTypeInfo*, v8::Local<v8::Object> wrapper) override; |
73 | 73 |
74 private: | 74 private: |
75 static PassRefPtr<DOMFloat32Array> createFloat32ArrayOrNull(size_t length); | 75 static PassRefPtr<DOMFloat32Array> createFloat32ArrayOrNull(size_t length); |
76 | 76 |
77 protected: | 77 protected: |
78 AudioBuffer(unsigned numberOfChannels, size_t numberOfFrames, float sampleRa
te); | 78 AudioBuffer(unsigned numberOfChannels, size_t numberOfFrames, float sampleRa
te); |
79 explicit AudioBuffer(AudioBus*); | 79 explicit AudioBuffer(AudioBus*); |
80 bool createdSuccessfully(unsigned desiredNumberOfChannels) const; | 80 bool createdSuccessfully(unsigned desiredNumberOfChannels) const; |
81 | 81 |
82 float m_sampleRate; | 82 float m_sampleRate; |
83 size_t m_length; | 83 size_t m_length; |
84 | 84 |
85 Vector<RefPtr<DOMFloat32Array>> m_channels; | 85 Vector<RefPtr<DOMFloat32Array>> m_channels; |
86 }; | 86 }; |
87 | 87 |
88 } // namespace blink | 88 } // namespace blink |
89 | 89 |
90 #endif // AudioBuffer_h | 90 #endif // AudioBuffer_h |
OLD | NEW |