VarwinAudioWrapper

class VarwinAudio.VarwinAudioWrapper(object: Object)

Bases: Object

class LoopState

Bases: object

Looped: Any = Ellipsis

Looped

Unlooped: Any = Ellipsis

Unlooped

property PlaybackLoopState: Any
Returns:

value from the list:

  • VarwinAudioWrapper.LoopState.Looped

  • VarwinAudioWrapper.LoopState.Unlooped

Example:

value = instance.PlaybackLoopState

Warning

An AttributeError exception may occur during use if the getter has not been implemented.

property Volume: float

Volume [0..1] to

Example:

value = instance.Volume

Warning

An AttributeError exception may occur during use if the getter has not been implemented.

property Speed: float

Playback speed to

Example:

value = instance.Speed

Warning

An AttributeError exception may occur during use if the getter has not been implemented.

property Length: Any

Audio length, s

Example:

value = instance.Length
property CurrentTime: Any

Current time, s

Example:

value = instance.CurrentTime
IsPlaying() bool

Is playing at the moment

Example:

value = instance.IsPlaying()
IsPaused() bool

Is paused at the moment

Example:

value = instance.IsPaused()
IsStopped() bool

Is stopped at the moment

Example:

value = instance.IsStopped()
async PlaySound() None

Play

Example:

await instance.PlaySound()
async StopSound() None

Stop

Example:

await instance.StopSound()
async PauseSound() None

Pause

Example:

await instance.PauseSound()
Seek(position: float) None

Play from [position] s

Example:

instance.Seek(0)
AddPlaybackCompletedHandler(handler: Callable[[Object], CoroutineType]) None

Playback was ended

Parameters:

handler

Asynchronous handler function with signature:

  • sender (Object): the object that triggered the event

Example:

async def OnPlaybackCompleted(sender):
  pass
instance.AddPlaybackCompletedHandler(OnPlaybackCompleted)