Top |
GEnum ╰── AgsSoundcardFormat GFlags ╰── AgsSoundcardCapability GInterface ╰── AgsSoundcard
void ags_soundcard_set_device (AgsSoundcard *soundcard
,gchar *card_id
);
Set device.
Since: 3.0.0
gchar *
ags_soundcard_get_device (AgsSoundcard *soundcard
);
Get device.
Since: 3.0.0
void ags_soundcard_set_presets (AgsSoundcard *soundcard
,guint channels
,guint rate
,guint buffer_size
,AgsSoundcardFormat format
);
Set presets.
soundcard |
the AgsSoundcard |
|
channels |
the audio channels |
|
rate |
the samplerate |
|
buffer_size |
the buffer size |
|
format |
the format |
Since: 3.0.0
void ags_soundcard_get_presets (AgsSoundcard *soundcard
,guint *channels
,guint *rate
,guint *buffer_size
,AgsSoundcardFormat *format
);
Get presets.
soundcard |
the AgsSoundcard |
|
channels |
the audio channels. |
[out] |
rate |
the samplerate. |
[out] |
buffer_size |
the buffer size. |
[out] |
format |
the format. |
[out] |
Since: 3.0.0
void ags_soundcard_list_cards (AgsSoundcard *soundcard
,GList **card_id
,GList **card_name
);
Retrieve card_id
and card_name
as a list of strings.
soundcard |
the AgsSoundcard |
|
card_id |
a list containing card ids. |
[element-type utf8][out callee-allocates][array zero-terminated=1][transfer full] |
card_name |
a list containing card names. |
[element-type utf8][out callee-allocates][array zero-terminated=1][transfer full] |
Since: 3.0.0
void ags_soundcard_pcm_info (AgsSoundcard *soundcard
,gchar *card_id
,guint *channels_min
,guint *channels_max
,guint *rate_min
,guint *rate_max
,guint *buffer_size_min
,guint *buffer_size_max
,GError **error
);
Retrieve detailed information of card_id
soundcard.
soundcard |
the AgsSoundcard |
|
card_id |
the selected soundcard by its string identifier |
|
channels_min |
min channels supported. |
[out] |
channels_max |
max channels supported. |
[out] |
rate_min |
min samplerate supported. |
[out] |
rate_max |
max samplerate supported. |
[out] |
buffer_size_min |
min buffer size supported by soundcard. |
[out] |
buffer_size_max |
max buffer size supported by soundcard. |
[out] |
error |
an error that may occure |
Since: 3.0.0
AgsSoundcardCapability
ags_soundcard_get_capability (AgsSoundcard *soundcard
);
Retrieve AgsSoundcardCapability information.
Since: 3.0.0
gboolean
ags_soundcard_is_available (AgsSoundcard *soundcard
);
Get available.
Since: 3.0.0
gboolean
ags_soundcard_is_starting (AgsSoundcard *soundcard
);
Get starting.
Since: 3.0.0
gboolean
ags_soundcard_is_playing (AgsSoundcard *soundcard
);
Get playing.
Since: 3.0.0
gboolean
ags_soundcard_is_recording (AgsSoundcard *soundcard
);
Get recording.
Since: 3.0.0
gchar *
ags_soundcard_get_uptime (AgsSoundcard *soundcard
);
Get playback time as string.
Since: 3.0.0
void ags_soundcard_play_init (AgsSoundcard *soundcard
,GError **error
);
Initializes the soundcard for playback.
Since: 3.0.0
void ags_soundcard_play (AgsSoundcard *soundcard
,GError **error
);
Plays the current buffer of soundcard.
Since: 3.0.0
void ags_soundcard_record_init (AgsSoundcard *soundcard
,GError **error
);
Initializes the soundcard for recordback.
Since: 3.0.0
void ags_soundcard_record (AgsSoundcard *soundcard
,GError **error
);
Records the current buffer of soundcard.
Since: 3.0.0
void
ags_soundcard_stop (AgsSoundcard *soundcard
);
Stops the soundcard from playing to it.
Since: 3.0.0
void
ags_soundcard_tic (AgsSoundcard *soundcard
);
Every call to play may generate a tic.
Since: 3.0.0
void ags_soundcard_offset_changed (AgsSoundcard *soundcard
,guint note_offset
);
Callback when counter expires minor note offset.
Since: 3.0.0
void *
ags_soundcard_get_buffer (AgsSoundcard *soundcard
);
Get current playback buffer.
Since: 3.0.0
void *
ags_soundcard_get_next_buffer (AgsSoundcard *soundcard
);
Get future playback buffer.
Since: 3.0.0
void *
ags_soundcard_get_prev_buffer (AgsSoundcard *soundcard
);
Get future playback buffer.
Since: 3.0.0
void ags_soundcard_lock_buffer (AgsSoundcard *soundcard
,void *buffer
);
Lock buffer
.
Since: 3.0.0
void ags_soundcard_unlock_buffer (AgsSoundcard *soundcard
,void *buffer
);
Unlock buffer
.
Since: 3.0.0
void ags_soundcard_set_bpm (AgsSoundcard *soundcard
,gdouble bpm
);
Set current playback bpm.
Since: 3.0.0
gdouble
ags_soundcard_get_bpm (AgsSoundcard *soundcard
);
Get current playback bpm.
Since: 3.0.0
void ags_soundcard_set_delay_factor (AgsSoundcard *soundcard
,gdouble delay_factor
);
Set current playback delay factor.
Since: 3.0.0
gdouble
ags_soundcard_get_delay_factor (AgsSoundcard *soundcard
);
Get current playback delay factor.
Since: 3.0.0
gdouble
ags_soundcard_get_absolute_delay (AgsSoundcard *soundcard
);
Get current playback delay.
Since: 3.0.0
gdouble
ags_soundcard_get_delay (AgsSoundcard *soundcard
);
Get current playback delay.
Since: 3.0.0
guint
ags_soundcard_get_attack (AgsSoundcard *soundcard
);
Get current playback attack.
Since: 3.0.0
guint
ags_soundcard_get_delay_counter (AgsSoundcard *soundcard
);
Get current playback note offset.
Since: 3.0.0
void ags_soundcard_set_start_note_offset (AgsSoundcard *soundcard
,guint start_note_offset
);
Set start playback note offset.
Since: 3.0.0
guint
ags_soundcard_get_start_note_offset (AgsSoundcard *soundcard
);
Get start playback note offset.
Since: 3.0.0
void ags_soundcard_set_note_offset (AgsSoundcard *soundcard
,guint note_offset
);
Set current playback note offset.
Since: 3.0.0
guint
ags_soundcard_get_note_offset (AgsSoundcard *soundcard
);
Get current playback note offset.
Since: 3.0.0
void ags_soundcard_set_note_offset_absolute (AgsSoundcard *soundcard
,guint note_offset
);
Set current playback note offset.
Since: 3.0.0
guint
ags_soundcard_get_note_offset_absolute
(AgsSoundcard *soundcard
);
Get current playback note offset.
Since: 3.0.0
void ags_soundcard_set_loop (AgsSoundcard *soundcard
,guint loop_left
,guint loop_right
,gboolean do_loop
);
Set loop parameters of soundcard
.
soundcard |
the AgsSoundcard |
|
loop_left |
loop position of region |
|
loop_right |
loop position of region |
|
do_loop |
if |
Since: 3.0.0
void ags_soundcard_get_loop (AgsSoundcard *soundcard
,guint *loop_left
,guint *loop_right
,gboolean *do_loop
);
Get loop parameters of soundcard
.
soundcard |
the AgsSoundcard |
|
loop_left |
return location of loop position's region. |
[out] |
loop_right |
return location of loop position's region. |
[out] |
do_loop |
return location of do loop. |
[out] |
Since: 3.0.0
guint
ags_soundcard_get_loop_offset (AgsSoundcard *soundcard
);
Get current playback loop offset.
Since: 3.0.0
guint
ags_soundcard_get_sub_block_count (AgsSoundcard *soundcard
);
Get sub block count.
Since: 3.0.0
gboolean ags_soundcard_trylock_sub_block (AgsSoundcard *soundcard
,void *buffer
,guint sub_block
);
Trylock sub block.
Since: 3.0.0
void ags_soundcard_unlock_sub_block (AgsSoundcard *soundcard
,void *buffer
,guint sub_block
);
Unlock sub block.
Since: 3.0.0
#define AGS_IS_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SOUNDCARD))
#define AGS_IS_SOUNDCARD_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_SOUNDCARD))
#define AGS_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SOUNDCARD, AgsSoundcard))
#define AGS_SOUNDCARD_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_SOUNDCARD, AgsSoundcardInterface))
#define AGS_SOUNDCARD_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_SOUNDCARD, AgsSoundcardInterface))
#define AGS_SOUNDCARD_DEFAULT_JIFFIE ((double) AGS_SOUNDCARD_DEFAULT_SAMPLERATE / (double) AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE)
#define AGS_SOUNDCARD_DEFAULT_TACT_JIFFIE (60.0 / AGS_SOUNDCARD_DEFAULT_BPM * AGS_SOUNDCARD_DEFAULT_TACT)
#define AGS_SOUNDCARD_DEFAULT_TACTRATE (1.0 / AGS_SOUNDCARD_DEFAULT_TACT_JIFFIE)
#define AGS_SOUNDCARD_DEFAULT_DELAY ((60.0 * ((AGS_SOUNDCARD_DEFAULT_SAMPLERATE / AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE) / AGS_SOUNDCARD_DEFAULT_BPM)) * ((1.0 / 16.0) * (1.0 / AGS_SOUNDCARD_DEFAULT_DELAY_FACTOR)))
AgsSoundcardFormat specifies the audio data representation to be used.
#define AGS_TYPE_SOUNDCARD_CAPABILITY (ags_soundcard_capability_get_type())
struct AgsSoundcardInterface { GTypeInterface ginterface; void (*set_device)(AgsSoundcard *soundcard, gchar *card_id); gchar* (*get_device)(AgsSoundcard *soundcard); void (*pcm_info)(AgsSoundcard *soundcard, gchar *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error); AgsSoundcardCapability (*get_capability)(AgsSoundcard *soundcard); void (*set_presets)(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, AgsSoundcardFormat format); void (*get_presets)(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, AgsSoundcardFormat *format); void (*list_cards)(AgsSoundcard *soundcard, GList **card_id, GList **card_name); gboolean (*is_available)(AgsSoundcard *soundcard); gboolean (*is_starting)(AgsSoundcard *soundcard); gboolean (*is_playing)(AgsSoundcard *soundcard); gboolean (*is_recording)(AgsSoundcard *soundcard); gchar* (*get_uptime)(AgsSoundcard *soundcard); void (*play_init)(AgsSoundcard *soundcard, GError **error); void (*play)(AgsSoundcard *soundcard, GError **error); void (*record_init)(AgsSoundcard *soundcard, GError **error); void (*record)(AgsSoundcard *soundcard, GError **error); void (*stop)(AgsSoundcard *soundcard); void (*tic)(AgsSoundcard *soundcard); void (*offset_changed)(AgsSoundcard *soundcard, guint note_offset); void* (*get_buffer)(AgsSoundcard *soundcard); void* (*get_next_buffer)(AgsSoundcard *soundcard); void* (*get_prev_buffer)(AgsSoundcard *soundcard); void (*lock_buffer)(AgsSoundcard *soundcard, void *buffer); void (*unlock_buffer)(AgsSoundcard *soundcard, void *buffer); void (*set_bpm)(AgsSoundcard *soundcard, gdouble bpm); gdouble (*get_bpm)(AgsSoundcard *soundcard); void (*set_delay_factor)(AgsSoundcard *soundcard, gdouble delay_factor); gdouble (*get_delay_factor)(AgsSoundcard *soundcard); gdouble (*get_absolute_delay)(AgsSoundcard *soundcard); gdouble (*get_delay)(AgsSoundcard *soundcard); guint (*get_attack)(AgsSoundcard *soundcard); guint (*get_delay_counter)(AgsSoundcard *soundcard); void (*set_start_note_offset)(AgsSoundcard *soundcard, guint start_note_offset); guint (*get_start_note_offset)(AgsSoundcard *soundcard); void (*set_note_offset)(AgsSoundcard *soundcard, guint note_offset); guint (*get_note_offset)(AgsSoundcard *soundcard); void (*set_note_offset_absolute)(AgsSoundcard *soundcard, guint note_offset); guint (*get_note_offset_absolute)(AgsSoundcard *soundcard); void (*set_loop)(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop); void (*get_loop)(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop); guint (*get_loop_offset)(AgsSoundcard *soundcard); guint (*get_sub_block_count)(AgsSoundcard *soundcard); gboolean (*trylock_sub_block)(AgsSoundcard *soundcard, void *buffer, guint sub_block); void (*unlock_sub_block)(AgsSoundcard *soundcard, void *buffer, guint sub_block); };
“offset-changed”
signalvoid user_function (AgsSoundcard *soundcard, guint note_offset, gpointer user_data)
The ::offset-changed signal notifies about changed position within notation.
soundcard |
the AgsSoundcard object |
|
note_offset |
new notation offset |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 3.0.0
“stop”
signalvoid user_function (AgsSoundcard *soundcard, gpointer user_data)
The ::stop signal is emitted every stop of the soundcard. This notifies about a newly played buffer.
soundcard |
the AgsSoundcard object |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 3.0.0
“tic”
signalvoid user_function (AgsSoundcard *soundcard, gpointer user_data)
The ::tic signal is emitted every tic of the soundcard. This notifies about a newly played buffer.
soundcard |
the AgsSoundcard object |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 3.0.0