See Also: Audio
The Audio class represents the audio subsystem, which implements an audio output stream. It is the hub for audio operations in your application. See the Urho.Audio documentation for more information.
The output is software mixed for an unlimited amount of simultaneous sounds. Ogg Vorbis sounds are decoded on the fly, and decoding them can be memory- and CPU-intensive, so WAV files are recommended when a large number of short sound effects need to be played.
For purposes of volume control, each SoundSource can be classified into a user defined group which is multiplied with a master category and the individual SoundSource gain set using SoundSource.Gain for the final volume level.
To control the category volumes, set the Audio.SetMasterGain, which defines the category if it didn't already exist.
It is possible to control the playback of a class of sounds identified by their type by using the Audio.PauseSoundType, Audio.ResumeSoundType and Audio.ResumeAll methods. You can probe whether a specific sound type is paused by calling the Audio.IsSoundTypePaused. The list of possible sound types are the strings “Master”, “Effect”, “Ambient”, “Voice” and “Music”.
Assembly: Urho (in Urho.dll)
Assembly Versions: 22.214.171.124
The members of Urho.Audio.Audio are listed below.
See Also: UrhoObject
|[read-only]||Initialized||Boolean. Return whether an audio stream has been reserved.|
|[read-only]||Interpolation||Boolean. Return whether output is interpolated.|
|Listener||SoundListener. Return active sound listener. Or Set active sound listener for 3D sounds.|
|[read-only]||MixRate||Int32. Return mixing rate.|
|[read-only]||Playing||Boolean. Return whether audio is being output.|
|[read-only]||SampleSize||UInt32. Return byte size of one sample.|
|[read-only]||Stereo||Boolean. Determines whether output is stereo.|
|Type||StringHash. Urho's type system type.|
|TypeName||String. Urho's low-level type name.|
|TypeNameStatic||String. Urho's low-level type name, accessible as a static method.|
|TypeStatic||StringHash. Urho's low-level type, accessible as a static method.|
Add a sound source to keep track of. Called by SoundSource.
Return master gain for a specific sound source type. Unknown sound types will return full gain (1).
Return sound type specific gain multiplied by master gain.
Return whether the specified master gain has been defined.
Returns whether the specified sound type is currently paused.
Mix sound sources into the buffer.
Pause playing back the sounds of the specific type.
Restart sound output.
Remove a sound source. Called by SoundSource.
Resumes playback of all sound types.
Resumes playing back the sounds of the specific type.
Set master gain on a specific sound type such as sound effects, music or voice.
|SetMode(Int32, Int32, Boolean, Boolean)|
Initialize sound output with specified buffer length and output mode.
Suspend sound output.
Stop any sound source playing a certain sound clip.