Velaptor.Content.IAudio
Velaptor
Velaptor.Content
IAudio Interface
A single audio that can be played, paused etc.
public interface IAudio :
Velaptor.Content.IContent,
System.IDisposable
Derived
↳ Audio
Implements IContent, System.IDisposable
Properties
BufferType
Gets the type of buffer.
Velaptor.Content.AudioBuffer BufferType { get; }
Property Value
FilePath
Gets the fully qualified path to the content file.
string FilePath { get; }
Implements FilePath
Property Value
Id
Gets the unique ID of the audio.
uint Id { get; }
Property Value
IsLooping
Gets or sets a value indicating whether the audio loops back to the beginning once the end has been reached.
bool IsLooping { get; set; }
Property Value
IsPaused
Gets a value indicating whether the audio is paused.
bool IsPaused { get; }
Property Value
IsPlaying
Gets a value indicating whether the audio is playing.
bool IsPlaying { get; }
Property Value
IsStopped
Gets a value indicating whether the audio is stopped.
bool IsStopped { get; }
Property Value
Length
Gets the length of the song.
System.TimeSpan Length { get; }
Property Value
Name
Gets the name of the content.
string Name { get; }
Implements Name
Property Value
PlaySpeed
Gets or sets the play speed to the given value.
float PlaySpeed { get; set; }
Property Value
Remarks
The valid range of value is between 0.25 and 2.0
with a value less then 0.25 defaulting to 0.25 and
with a value greater then 2.0 defaulting to 2.0.
Position
Gets the current time position of the audio.
System.TimeSpan Position { get; }
Property Value
Volume
Gets or sets the volume of the audio.
float Volume { get; set; }
Property Value
Remarks
The only valid value accepted is 0-100. If a value outside of
this range is used, it will be set within that range.
Methods
FastForward(float)
Fast forwards the audio by the given amount of seconds.
void FastForward(float seconds);
Parameters
seconds
System.Single
The amount of seconds to fast forward the song.
Pause()
Pauses the audio.
void Pause();
Play()
Plays the audio.
void Play();
Rewind(float)
Rewinds the audio by the given amount of seconds.
void Rewind(float seconds);
Parameters
seconds
System.Single
The amount of seconds to rewind the song.
SetTimePosition(float)
Sets the time position of the audio to the given value.
void SetTimePosition(float seconds);
Parameters
seconds
System.Single
The time position in seconds of where to set the audio.
Stop()
Stops the audio playback and resets back to the beginning.
void Stop();