Top |
#define | AGS_SOUNDCARD_DEFAULT_DSP_CHANNELS |
#define | AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS |
#define | AGS_SOUNDCARD_DEFAULT_SAMPLERATE |
#define | AGS_SOUNDCARD_DEFAULT_FORMAT |
#define | AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE |
#define | AGS_SOUNDCARD_DEFAULT_DEVICE |
#define | AGS_SOUNDCARD_DEFAULT_BPM |
#define | AGS_SOUNDCARD_DEFAULT_DELAY_FACTOR |
#define | AGS_SOUNDCARD_DEFAULT_JIFFIE |
#define | AGS_SOUNDCARD_DEFAULT_TACT |
#define | AGS_SOUNDCARD_DEFAULT_TACT_JIFFIE |
#define | AGS_SOUNDCARD_DEFAULT_TACTRATE |
#define | AGS_SOUNDCARD_DEFAULT_SCALE |
#define | AGS_SOUNDCARD_DEFAULT_DELAY |
#define | AGS_SOUNDCARD_DEFAULT_PERIOD |
#define | AGS_SOUNDCARD_DEFAULT_LOOP_LEFT |
#define | AGS_SOUNDCARD_DEFAULT_LOOP_RIGHT |
#define | AGS_SOUNDCARD_DEFAULT_OVERCLOCK |
enum | AgsSoundcardFormat |
void ags_soundcard_set_application_context (AgsSoundcard *soundcard
,AgsApplicationContext *application_context
);
Set application context.
Since: 0.4.3
AgsApplicationContext *
ags_soundcard_get_application_context (AgsSoundcard *soundcard
);
Get application context.
Since: 0.4.3
void ags_soundcard_set_application_mutex (AgsSoundcard *soundcard
,pthread_mutex_t *application_mutex
);
Set application mutex.
Since: 0.7.0
pthread_mutex_t *
ags_soundcard_get_application_mutex (AgsSoundcard *soundcard
);
Get application mutex.
Since: 0.7.0
void ags_soundcard_set_device (AgsSoundcard *soundcard
,gchar *device_id
);
Set device.
Since: 0.4.3
gchar *
ags_soundcard_get_device (AgsSoundcard *soundcard
);
Get device.
Since: 0.4.3
void ags_soundcard_set_presets (AgsSoundcard *soundcard
,guint channels
,guint rate
,guint buffer_size
,guint format
);
Set presets.
soundcard |
an AgsSoundcard |
|
channels |
the audio channels |
|
rate |
the samplerate |
|
buffer_size |
the buffer size |
|
format |
the format |
Since: 0.4.2
void ags_soundcard_get_presets (AgsSoundcard *soundcard
,guint *channels
,guint *rate
,guint *buffer_size
,guint *format
);
Get presets.
soundcard |
an AgsSoundcard |
|
channels |
the audio channels |
|
rate |
the samplerate |
|
buffer_size |
the buffer size |
|
format |
the format |
Since: 0.4.2
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 |
an AgsSoundcard |
|
card_id |
a list containing card ids |
|
card_name |
a list containing card names |
Since: 0.4.2
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 |
an AgsSoundcard |
|
card_id |
the selected soundcard by its string identifier |
|
channels_min |
min channels supported |
|
channels_max |
max channels supported |
|
rate_min |
min samplerate supported |
|
rate_max |
max samplerate supported |
|
buffer_size_min |
min buffer size supported by soundcard |
|
buffer_size_max |
max buffer size supported by soundcard |
|
error |
an error that may occure |
Since: 0.4.2
gboolean
ags_soundcard_is_starting (AgsSoundcard *soundcard
);
Get starting.
Since: 0.4.3
gboolean
ags_soundcard_is_playing (AgsSoundcard *soundcard
);
Get playing.
Since: 0.4.3
gboolean
ags_soundcard_is_recording (AgsSoundcard *soundcard
);
Get recording.
Since: 0.7.0
void ags_soundcard_play (AgsSoundcard *soundcard
,GError **error
);
Plays the current buffer of soundcard.
Since: 0.4.2
void ags_soundcard_record_init (AgsSoundcard *soundcard
,GError **error
);
void ags_soundcard_record (AgsSoundcard *soundcard
,GError **error
);
Records the current buffer of soundcard.
Since: 0.7.0
void
ags_soundcard_stop (AgsSoundcard *soundcard
);
Stops the soundcard from playing to it.
Since: 0.4.2
void
ags_soundcard_tic (AgsSoundcard *soundcard
);
Every call to play may generate a tic.
Since: 0.4.2
void ags_soundcard_offset_changed (AgsSoundcard *soundcard
,guint note_offset
);
Callback when counter expires minor note offset.
Since: 0.4.2
void *
ags_soundcard_get_buffer (AgsSoundcard *soundcard
);
Get current playback buffer.
Since: 0.4.2
void *
ags_soundcard_get_next_buffer (AgsSoundcard *soundcard
);
Get future playback buffer.
Since: 0.4.2
void ags_soundcard_set_bpm (AgsSoundcard *soundcard
,gdouble bpm
);
Set current playback bpm.
Since: 0.4.3
gdouble
ags_soundcard_get_bpm (AgsSoundcard *soundcard
);
Get current playback bpm.
Since: 0.4.3
void ags_soundcard_set_delay_factor (AgsSoundcard *soundcard
,gdouble delay_factor
);
Set current playback delay factor.
Since: 0.7.0
gdouble
ags_soundcard_get_delay_factor (AgsSoundcard *soundcard
);
Get current playback delay factor.
Since: 0.7.0
gdouble
ags_soundcard_get_delay (AgsSoundcard *soundcard
);
Get current playback delay.
Since: 0.4.2
guint
ags_soundcard_get_attack (AgsSoundcard *soundcard
);
Get current playback attack.
Since: 0.4.2
guint
ags_soundcard_get_delay_counter (AgsSoundcard *soundcard
);
Get current playback note offset.
Since: 0.7.6
void ags_soundcard_set_note_offset (AgsSoundcard *soundcard
,guint note_offset
);
Set current playback note offset.
Since: 0.4.2
guint
ags_soundcard_get_note_offset (AgsSoundcard *soundcard
);
Get current playback note offset.
Since: 0.4.2
void ags_soundcard_set_loop (AgsSoundcard *soundcard
,guint loop_left
,guint loop_right
,gboolean loop
);
Since: 0.7.35
void ags_soundcard_get_loop (AgsSoundcard *soundcard
,guint *loop_left
,guint *loop_right
,gboolean *do_loop
);
Since: 0.7.35
guint
ags_soundcard_get_loop_offset (AgsSoundcard *soundcard
);
Get current playback loop offset.
Since: 0.7.35
void ags_soundcard_set_audio (AgsSoundcard *soundcard
,GList *audio
);
Set audio.
Since: 0.4.3
GList *
ags_soundcard_get_audio (AgsSoundcard *soundcard
);
Get audio.
Since: 0.4.3
#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 (AGS_SOUNDCARD_DEFAULT_JIFFIE * (60.0 / AGS_SOUNDCARD_DEFAULT_BPM))
“offset-changed”
signalvoid user_function (AgsSoundcard *soundcard, guint note_offset, gpointer user_data)
Flags: Run Last