Class
ALSACtlCard
Description [src]
class ALSACtl.Card : GObject.Object {
parent_instance: GObject
}
An GObject-derived object to express sound card.
A ALSACtlCard
is a GObject-derived object to express sound card. Applications use the
instance of object to manipulate functionalities on sound card. After the call of
alsactl_card_open()
for the numeric ID of sound card, the object maintains file descriptor till
object destruction.
Constructors
alsactl_card_new
Allocate and return an instance of ALSACtlCard
.
Instance methods
alsactl_card_add_elems
Add the user-defined elements and return the list of their identifier.
alsactl_card_command_elem_tlv
Command the given array of bytes as Type/Length/Value data for element pointed by the identifier.
alsactl_card_create_source
Allocate GSource
structure to handle events from ALSA control character device. In
each iteration of GMainContext
, the read(2)
system call is executed to dispatch
control event for ALSACtlCard::handle-elem-event
signal, according to the result of poll(2)
system call.
alsactl_card_get_elem_id_list
Generate a list of ALSACtlElemId
for ALSA control character device associated to the sound card.
alsactl_card_get_elem_info
Get information of element corresponding to given id.
alsactl_card_get_info
Get the information of sound card.
alsactl_card_get_protocol_version
Get the version of control protocol currently used. The version is expressed as the array with three elements; major, minor, and micro version in the order. The length of major version is 16 bit, the length of minor and micro version is 8 bit each.
alsactl_card_lock_elem
Lock/Unlock indicated element not to be written by the other processes.
alsactl_card_open
Open ALSA control character device for the sound card.
alsactl_card_read_elem_tlv
Read Type/Length/Value data from element pointed by the identifier and fulfil the given array of bytes with the data.
alsactl_card_read_elem_value
Read given value from element indicated by the given identifier.
alsactl_card_remove_elems
Remove user-defined elements pointed by the identifier.
alsactl_card_replace_elems
Add user-defined elements to replace the existent ones.
alsactl_card_write_elem_tlv
Write the given array of bytes as Type/Length/Value data for element pointed by the identifier.
alsactl_card_write_elem_value
Write given value to element indicated by the given identifier.
Properties
ALSACtl.Card:devnode
The full path to special file of control character device.
ALSACtl.Card:subscribed
Whether to be subscribed for event.
Signals
ALSACtl.Card::handle-disconnection
Emitted when the sound card is not available anymore due to unbinding driver or hot
unplugging. The owner of this object should call g_object_unref()
as quickly
as possible to be going to release ALSA control character device.
ALSACtl.Card::handle-elem-event
Emitted when event occurs for any element.
Signals inherited from GObject (1)
GObject.Object::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct ALSACtlCardClass {
GObjectClass parent_class;
void (* handle_elem_event) (
ALSACtlCard* self,
const ALSACtlElemId* elem_id,
ALSACtlElemEventMask events
);
void (* handle_disconnection) (
ALSACtlCard* self
);
}
Class members
parent_class |
|
No description available. | |
handle_elem_event |
|
No description available. | |
handle_disconnection |
|
No description available. |
Virtual methods
ALSACtl.CardClass.handle_disconnection
Class closure for the ALSACtlCard::handle-disconnection
signal.
ALSACtl.CardClass.handle_elem_event
Class closure for the ALSACtlCard::handle-elem-event
signal.