pc.Sound
Represents the resource of an audio asset.
Summary
Properties
| audio | If the Web Audio API is not supported this contains the audio data. |
| buffer | If the Web Audio API is supported this contains the audio data. |
| duration | Returns the duration of the sound. |
Details
Constructor
Sound(resource)
Parameters
| resource | HTMLAudioElement, AudioBuffer | If the Web Audio API is supported, pass an AudioBuffer object, otherwise an Audio object. |