class
AudioClip
Audio clip stores audio data in a compressed or uncompressed format.
Clips can be provided to audio sources or other audio methods to be played.
Public
Methods
~AudioClip
GetBitDepth
Returns the size of a single sample, in bits.
GetFrequency
Returns how many samples per second is the audio encoded in.
GetChannelCount
Returns the number of channels provided by the clip.
GetLength
Returns the length of the audio clip, in seconds.
GetSampleCount
Returns the total number of samples in the clip (includes all channels).
Is3D
Determines will the clip be played a spatial 3D sound, or as a normal sound (for example music).
staticCreate
Creates a new AudioClip and populates it with provided samples.
- samples
- Data streams containing the samples to load. Data will be read starting from the current position in the stream. The samples should be in audio format as specified in the parameter. Ownership of the data stream is taken by the audio clip and the caller must not close it manually.
- streamSize
- Number of bytes to read from the stream.
- sampleCount
- Total number of samples (including all channels).
- createInformation
- Descriptor containing meta-data for the provided samples.
staticGetRttiStatic
GetRtti
Returns an interface you can use to access class' Run Time Type Information.
staticCreateEmpty
Creates an AudioClip with no samples.
You must populate its data manually followed by a call to Initialize().
Internal
Methods
Protected
Constructors
AudioClip
Methods
Initialize
Initializes all the internal data of this object.
Must be called right after construction for new objects, or after deserialization for deserialized objects. If requested, render proxy is created and queued for initialization on the render thread.
IsCompressible
Returns true if the resource can be compressed using a generic compression when saved on a storage device.
Certain resources already have their contents compressed (like audio files) and will not benefit from further compression. Resources supporting streaming should never be compressed, instead such resources can handle compression/decompression locally through their streams.
GetSourceStream
Returns original audio data.
Only available if has been provided on creation.
- outSize
- Size of the returned stream data, in bytes.
Returns: Stream containing the original audio data.