-
Notifications
You must be signed in to change notification settings - Fork 50
First Look Audio
Ultraviolet’s Audio subsystem is exposed through the IUltravioletAudio
interface, which you can retrieve an instance of by calling UltravioletContext.GetAudio()
. This interface allows you to change the state of the current audio playback device.
Check out the reference documentation for a complete run-down what what the IUltravioletAudio
interface is capable of. Here’s a brief overview of some of the important points.
You can enumerate the system's audio devices using the EnumerateAudioDevices()
method and select the one to use for audio playback using the PlaybackDevice
property.
You can suspend and resume all audio playback using the Suspend()
and Resume()
methods.
You can modify global volume settings using the AudioMasterVolume
, SongsMasterVolume
, and SoundEffectsMasterVolume
properties.
You can globally mute and unmute sounds using the AudioMuted
, SongsMuted
, and SoundEffectsMuted
properties.
This list is not exhaustive, but should be enough to get you started. Check out the reference documentation for more information.
The Song
class represents streaming audio intended for use as background music. You can access basic information about the song, such as its name, duration, and metadata tags, using the the class' instance methods and properties. You can play Song
instances using the SongPlayer
class.
The SoundEffect
class represents short audio samples intended for use as sound effects. You can play SoundEffect
instances in a "fire-and-forget" fashion using the class' instance methods, or you can manage their playback more precisely using the SoundEffectPlayer
class.
- Contributing
- Dependencies
- Basic Concepts
- First Look- Platform
- First Look- Graphics
- First Look- Audio
- First Look- Input
- First Look- Content
- First Look- UI
- sRGB Color
- Customizing SpriteBatch
- Creating Fonts
- Creating Effects
- Creating Glyph Shaders
- FreeType2 Fonts
- Rendering 3D Models