Class Alsa
java.lang.Object
net.avadeaux.klipspringer.alsa.Alsa
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
Alsa.Player,Alsa.Tuner
Base class that has static members for accessing ALSA devices, as well as being a common base
class for
Alsa.Player and Alsa.Tuner classes used for sending to or receiving
from specific devices. Alsa.Player.devices and Alsa.Tuner.devices can be used
for finding out what devices are available.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass for sending PCM data to an ALSA device.static classClass for receiving PCM data from an ALSA device. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPause()Checks ifAlsa.Playersupports pausing.voidclose()SeeCloseable.close().voiddrain()Waits forAlsa.Playerto send on any data it has buffered up and closes it.final PcmFormatformat()Gets the audio format ofAlsa.PlayerorAlsa.Tuner.final Device.BitLayoutlayout()Gets the bit layout ofAlsa.Player.voidpause()PausesAlsa.Player(if itcanPause()).voidunpause()Takes a pausedAlsa.Playerinto playing mode.
-
Method Details
-
format
Gets the audio format ofAlsa.PlayerorAlsa.Tuner. -
layout
Gets the bit layout ofAlsa.Player. -
drain
Waits forAlsa.Playerto send on any data it has buffered up and closes it.- Throws:
IOException
-
canPause
public boolean canPause()Checks ifAlsa.Playersupports pausing. -
pause
-
unpause
Takes a pausedAlsa.Playerinto playing mode.- Throws:
IOException
-
close
public void close()SeeCloseable.close().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-