Urho.Audio.Sound Class

Sound resource.

See Also: Sound


public class Sound : Resource


Sounds can be played back with either the SoundSource or the SoundSource3D components. 

This allows manual stereo panning of mono sounds; stereo sounds will be output with their original stereo mix.


Namespace: Urho.Audio
Assembly: Urho (in Urho.dll)
Assembly Versions:

The members of Urho.Audio.Sound are listed below.

See Also: Resource

Public Constructors

Constructs a new instance of Urho.Audio.Sound which is tied to the Application.CurrentContext.
Constructs a new instance of Urho.Audio.Sound, given a raw pointer to an unmanaged object
Constructs a new instance of Urho.Audio.Sound linked to a specific Context.

Protected Constructors

Empty constructor, chain to this constructor when you provide your own constructor that sets the handle field.

Public Properties

CompressedBoolean. Return whether is compressed.
DataSizeUInt32. Return total sound data size.
DecoderStreamSoundStream. Return a new instance of a decoder sound stream. Used by compressed sounds.
EndSByte*. Return sound data end.
FrequencySingle. Return default frequency as a float.
IntFrequencyUInt32. Return default frequency as an integer.
LengthSingle. Return length in seconds.
LoopedBoolean. Set loop on/off. If loop is enabled, sets the full sound as loop range.
RepeatSByte*. Return loop start.
SampleSizeUInt32. Return sample size.
SixteenBitBoolean. Return whether data is sixteen bit.
StartSByte*. Return sound data start.
StereoBoolean. Return whether data is stereo.
TypeStringHash. Urho's type system type.
TypeNameString. Urho's low-level type name.
TypeNameStaticString. Urho's low-level type name, accessible as a static method.
TypeStaticStringHash. Urho's low-level type, accessible as a static method.

Public Methods

BeginLoad(File) : Boolean
BeginLoad(MemoryBuffer) : Boolean
Fix interpolation by copying data from loop start to loop end (looped), or adding silence (oneshot.) Called internally, does not normally need to be called, unless the sound data is modified manually on the fly.
LoadOggVorbis(File) : Boolean
LoadOggVorbis(MemoryBuffer) : Boolean
LoadRaw(File) : Boolean
LoadRaw(MemoryBuffer) : Boolean
LoadWav(File) : Boolean
LoadWav(MemoryBuffer) : Boolean
Register object factory.
SetData(Void*, UInt32)
Set uncompressed sound data.
SetFormat(UInt32, Boolean, Boolean)
Set uncompressed sound data format.
SetLoop(UInt32, UInt32)
Define loop.
Set sound size in bytes. Also resets the sound to be uncompressed and one-shot.