OpenAudioDevice class
An open device.
This class does not represent anything specific in SDL, but is used because SDL_OpenAudioDevice essentially returns 2 values:
- The ID of the device (which apparently can be different from the original index).
- The AudioSpec of the opened device, which is inaccessible outside of this function.
Constructors
- OpenAudioDevice(Sdl sdl, AudioDevice? device, int id, AudioSpec spec)
- Create a device.
Properties
- device → AudioDevice?
-
The device which was opened to create this object.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
The ID returned by
SDL_OpenAudioDevice.
final
- paused ↔ bool
-
Returns
true
if this device is paused.getter/setter pair - queueSize → int
-
Get the number of bytes of still-queued audio.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sdl → Sdl
-
The SDL bindings to use.
final
- spec → AudioSpec
-
The settings for the opened audio device.
final
- status → AudioStatus
-
The status of this device.
no setter
Methods
-
clearQueuedAudio(
) → void - Clear queued audio.
-
close(
) → void - Close this device.
-
lock(
) → void - Lock the audio device.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → void - Pause this device.
-
play(
) → void - Start or resume this device.
-
queueAudio(
WaveFile file) → void - Queue a wave file.
-
toString(
) → String -
A string representation of this object.
inherited
-
unlock(
) → void - Unlock the audio device.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited