Table of Contents

Class Audio

Namespace
BasilEngine.Components
Assembly
BasilEngine.dll
[NativeHeader("Bindings/ManagedAudio.hpp")]
[NativeClass("ManagedAudio", ".")]
public class Audio : Component
Inheritance
Audio
Inherited Members

Properties

Looping

Whether the audio should loop when it reaches the end.

public bool Looping { get; set; }

Property Value

bool

Volume

Volume multiplier for this audio source.

public float Volume { get; set; }

Property Value

float

Methods

GetIsLooping(ulong)

[NativeMethod("GetIsLooping")]
[StaticAccessor("ManagedAudio", StaticAccessorType.DoubleColon)]
public static extern bool GetIsLooping(ulong handle)

Parameters

handle ulong

Returns

bool

InternalPause(ulong)

[NativeMethod("Pause")]
[StaticAccessor("ManagedAudio", StaticAccessorType.DoubleColon)]
public static extern void InternalPause(ulong handle)

Parameters

handle ulong

InternalPlay(ulong)

[NativeMethod("Play")]
[StaticAccessor("ManagedAudio", StaticAccessorType.DoubleColon)]
public static extern void InternalPlay(ulong handle)

Parameters

handle ulong

InternalStop(ulong)

[NativeMethod("Stop")]
[StaticAccessor("ManagedAudio", StaticAccessorType.DoubleColon)]
public static extern void InternalStop(ulong handle)

Parameters

handle ulong

Pause()

Pauses playback.

public void Pause()

Play()

Starts playback.

public void Play()

SetIsLooping(ulong, bool)

[NativeMethod("SetIsLooping")]
[StaticAccessor("ManagedAudio", StaticAccessorType.DoubleColon)]
public static extern void SetIsLooping(ulong handle, bool isLooping)

Parameters

handle ulong
isLooping bool

Stop()

Stops playback and resets the cursor to the start.

public void Stop()

getVolume(ulong)

[NativeMethod("GetVolume")]
[StaticAccessor("ManagedAudio", StaticAccessorType.DoubleColon)]
public static extern float getVolume(ulong handle)

Parameters

handle ulong

Returns

float

setVolume(ulong, float)

[NativeMethod("SetVolume")]
[StaticAccessor("ManagedAudio", StaticAccessorType.DoubleColon)]
public static extern void setVolume(ulong handle, float volume)

Parameters

handle ulong
volume float