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_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.
“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