Top |
Functions
Properties
attack | Read / Write | |
buffer-size | Read / Write | |
|
damping | Read / Write |
delay | Read / Write | |
first-frame | Read / Write | |
format | Read / Write | |
frame-count | Read / Write | |
|
input-soundcard | Read / Write |
input-soundcard-channel | Read / Write | |
last-frame | Read / Write | |
length | Read / Write | |
loop-end | Read / Write | |
loop-start | Read / Write | |
note | Read / Write | |
|
output-soundcard | Read / Write |
output-soundcard-channel | Read / Write | |
AgsRecallID * | recall-id | Read / Write |
AgsRecycling * | recycling | Read / Write |
AgsAudioSignal * | rt-template | Read / Write |
samplerate | Read / Write | |
stream | Read | |
stream-current | Read | |
stream-end | Read | |
AgsAudioSignal * | template | Read / Write |
timbre-end | Read / Write | |
timbre-start | Read / Write | |
|
vibration | Read / Write |
word-size | Read |
Types and Values
enum | AgsAudioSignalFlags |
#define | AGS_TYPE_AUDIO_SIGNAL |
struct | AgsAudioSignal |
struct | AgsAudioSignalClass |
Description
AgsAudioSignal organizes audio data within a
It has output-soundcard
and input-soundcard
properties AgsRecall implementations
should default to.
The stream
property contains the processing audio data. You may set loop-start
and loop-end
to loop over samples until desired audio buffer length is achieved.
As accessing the audio data you should lock it with ags_audio_signal_stream_lock()
and as
completed your work you release the lock with ags_audio_signal_stream_unlock()
.
The note
property contains information about assigned AgsNote objects coming from AgsNotation
residing in AgsAudio.
As you might see multiple key presses may apply to one AgsAudioSignal.
Functions
AGS_AUDIO_SIGNAL_GET_OBJ_MUTEX()
#define AGS_AUDIO_SIGNAL_GET_OBJ_MUTEX(obj) (&(((AgsAudioSignal *) obj)->obj_mutex))
AGS_AUDIO_SIGNAL_GET_STREAM_MUTEX()
#define AGS_AUDIO_SIGNAL_GET_STREAM_MUTEX(obj) (&(((AgsAudioSignal *) obj)->stream_mutex))
ags_audio_signal_get_obj_mutex ()
GRecMutex * ags_audio_signal_get_obj_mutex (AgsAudioSignal *audio_signal
);
Get object mutex.
Since:
ags_audio_signal_stream_lock ()
void ags_audio_signal_stream_lock (AgsAudioSignal *audio_signal
);
Lock stream mutex.
Since:
ags_audio_signal_stream_unlock ()
void ags_audio_signal_stream_unlock (AgsAudioSignal *audio_signal
);
Unlock stream mutex.
Since:
ags_audio_signal_test_flags ()
gboolean ags_audio_signal_test_flags (AgsAudioSignal *audio_signal
,);
guint flags
Test flags
to be set on audio_signal
.
Since:
ags_audio_signal_set_flags ()
void ags_audio_signal_set_flags (AgsAudioSignal *audio_signal
,);
guint flags
Enable a feature of audio_signal
.
Since:
ags_audio_signal_unset_flags ()
void ags_audio_signal_unset_flags (AgsAudioSignal *audio_signal
,);
guint flags
Disable a feature of audio_signal
.
Since:
ags_stream_alloc ()
void * ags_stream_alloc (,
guint buffer_size);
guint format
Allocs an audio buffer.
Since:
ags_stream_slice_alloc ()
void * ags_stream_slice_alloc (,
guint buffer_size);
guint format
Allocs an audio buffer.
Since:
ags_stream_slice_free ()
void ags_stream_slice_free (,
guint buffer_size,
guint format);
void *buffer
Frees an audio buffer.
Since:
ags_audio_signal_get_recycling ()
GObject * ags_audio_signal_get_recycling (AgsAudioSignal *audio_signal
);
Get recycling.
Since:
ags_audio_signal_set_recycling ()
void ags_audio_signal_set_recycling (AgsAudioSignal *audio_signal
,);
GObject *recycling
Set recycling.
Since:
ags_audio_signal_get_output_soundcard ()
GObject * ags_audio_signal_get_output_soundcard (AgsAudioSignal *audio_signal
);
Get the output soundcard object of audio_signal
.
Since:
ags_audio_signal_set_output_soundcard ()
void ags_audio_signal_set_output_soundcard (AgsAudioSignal *audio_signal
,);
GObject *output_soundcard
Set the output soundcard object of audio_signal
.
Since:
ags_audio_signal_get_input_soundcard ()
GObject * ags_audio_signal_get_input_soundcard (AgsAudioSignal *audio_signal
);
Get the input soundcard object of audio_signal
.
Since:
ags_audio_signal_set_input_soundcard ()
void ags_audio_signal_set_input_soundcard (AgsAudioSignal *audio_signal
,);
GObject *input_soundcard
Set the input soundcard object of audio_signal
.
Since:
ags_audio_signal_get_samplerate ()
guint ags_audio_signal_get_samplerate (AgsAudioSignal *audio_signal
);
Gets samplerate.
Since:
ags_audio_signal_set_samplerate ()
void ags_audio_signal_set_samplerate (AgsAudioSignal *audio_signal
,);
guint samplerate
Set samplerate.
Since:
ags_audio_signal_get_buffer_size ()
guint ags_audio_signal_get_buffer_size (AgsAudioSignal *audio_signal
);
Gets buffer size.
Since:
ags_audio_signal_set_buffer_size ()
void ags_audio_signal_set_buffer_size (AgsAudioSignal *audio_signal
,);
guint buffer_size
Set buffer size.
Since:
ags_audio_signal_get_format ()
guint ags_audio_signal_get_format (AgsAudioSignal *audio_signal
);
Gets format.
Since:
ags_audio_signal_set_format ()
void ags_audio_signal_set_format (AgsAudioSignal *audio_signal
,);
guint format
Set format.
Since:
ags_audio_signal_get_note ()
GList * ags_audio_signal_get_note (AgsAudioSignal *audio_signal
);
Get note.
Since:
ags_audio_signal_set_note ()
void ags_audio_signal_set_note (AgsAudioSignal *audio_signal
,);
GList *note
Set note by replacing existing.
Parameters
audio_signal |
the AgsAudioSignal |
|
note |
the |
[element-type AgsAudio.Note][transfer full] |
Since:
ags_audio_signal_add_note ()
void ags_audio_signal_add_note (AgsAudioSignal *audio_signal
,);
GObject *note
Add note to audio_signal
.
Since:
ags_audio_signal_remove_note ()
void ags_audio_signal_remove_note (AgsAudioSignal *audio_signal
,);
GObject *note
Remove note from audio_signal
.
Since:
ags_audio_signal_get_stream ()
GList * ags_audio_signal_get_stream (AgsAudioSignal *audio_signal
);
Get stream.
Since:
ags_audio_signal_set_stream ()
void ags_audio_signal_set_stream (AgsAudioSignal *audio_signal
,);
GList *stream
Set stream by replacing existing.
Parameters
audio_signal |
the AgsAudioSignal |
|
stream |
the |
[element-type guint8][transfer full] |
Since:
ags_audio_signal_add_stream ()
void ags_audio_signal_add_stream (AgsAudioSignal *audio_signal
);
Adds a buffer at the end of the stream.
Since:
ags_audio_signal_stream_resize ()
void ags_audio_signal_stream_resize (AgsAudioSignal *audio_signal
,);
guint length
Resize stream of audio_signal
to length
number of buffers.
Since:
ags_audio_signal_stream_safe_resize ()
void ags_audio_signal_stream_safe_resize (AgsAudioSignal *audio_signal
,);
guint length
Resize stream of audio_signal
to length
number of buffers. But doesn't shrink
more than the current stream position.
Since:
ags_audio_signal_clear ()
void ags_audio_signal_clear (AgsAudioSignal *audio_signal
);
Clear audio_signal
.
Since:
ags_audio_signal_duplicate_stream ()
void ags_audio_signal_duplicate_stream (AgsAudioSignal *audio_signal
,AgsAudioSignal *template
);
Apply template
audio data to audio_signal
. Note should only be invoked
by proper recall context because only the stream of template
is locked.
Since:
ags_audio_signal_feed ()
void ags_audio_signal_feed (AgsAudioSignal *audio_signal
,AgsAudioSignal *template
,);
guint frame_count
Feed audio signal to grow upto frame count.
Parameters
audio_signal |
the AgsAudioSignal |
|
template |
the template AgsAudioSignal |
|
frame_count |
the new frame count |
Since:
ags_audio_signal_feed_extended ()
void ags_audio_signal_feed_extended (AgsAudioSignal *audio_signal
,AgsAudioSignal *template
,,
guint frame_count,
guint old_frame_count,
gboolean do_open);
gboolean do_close
Feed audio signal to grow upto frame count.
Parameters
audio_signal |
the AgsAudioSignal |
|
template |
the template AgsAudioSignal |
|
frame_count |
the new frame count |
|
old_frame_count |
the old frame count |
|
do_open |
open feed |
|
do_close |
close feed |
Since:
ags_audio_signal_open_feed ()
void ags_audio_signal_open_feed (AgsAudioSignal *audio_signal
,AgsAudioSignal *template
,,
guint frame_count);
guint old_frame_count
Feed audio signal to grow upto frame count.
Parameters
audio_signal |
the AgsAudioSignal |
|
template |
the template AgsAudioSignal |
|
frame_count |
the new frame count |
|
old_frame_count |
the old frame count |
Since:
ags_audio_signal_continue_feed ()
void ags_audio_signal_continue_feed (AgsAudioSignal *audio_signal
,AgsAudioSignal *template
,,
guint frame_count);
guint old_frame_count
Feed audio signal to grow upto frame count.
Parameters
audio_signal |
the AgsAudioSignal |
|
template |
the template AgsAudioSignal |
|
frame_count |
the new frame count |
|
old_frame_count |
the old frame count |
Since:
ags_audio_signal_close_feed ()
void ags_audio_signal_close_feed (AgsAudioSignal *audio_signal
,AgsAudioSignal *template
,,
guint frame_count);
guint old_frame_count
Feed audio signal to grow upto frame count.
Parameters
audio_signal |
the AgsAudioSignal |
|
template |
the template AgsAudioSignal |
|
frame_count |
the new frame count |
|
old_frame_count |
the old frame count |
Since:
ags_audio_signal_get_length_till_current ()
guint ags_audio_signal_get_length_till_current (AgsAudioSignal *audio_signal
);
Counts the buffers from :stream upto :stream-current.
Since:
ags_audio_signal_contains_note ()
gboolean ags_audio_signal_contains_note (AgsAudioSignal *audio_signal
,AgsNote *note
);
Check if audio_signal
contains note
.
Since:
ags_audio_signal_get_template ()
AgsAudioSignal *
ags_audio_signal_get_template (GList *audio_signal
);
Retrieve the template audio signal.
Parameters
audio_signal |
the |
[element-type AgsAudio.AudioSignal][transfer none] |
Since:
ags_audio_signal_get_rt_template ()
GList * ags_audio_signal_get_rt_template ();
GList *audio_signal
Retrieve the realtime template audio signal.
Parameters
audio_signal |
a |
[element-type AgsAudio.AudioSignal][transfer none] |
Returns
the rt-templates as
[element-type AgsAudio.AudioSignal][transfer full]
Since:
ags_audio_signal_find_stream_current ()
GList * ags_audio_signal_find_stream_current (,
GList *audio_signal);
GObject *recall_id
Retrieve next current stream of AgsAudioSignal list. Warning this function does not lock the stream mutex.
Parameters
audio_signal |
the |
[element-type AgsAudio.AudioSignal][transfer none] |
recall_id |
the matching AgsRecallID |
Since:
ags_audio_signal_find_by_recall_id ()
GList * ags_audio_signal_find_by_recall_id (,
GList *audio_signal);
GObject *recall_id
Retrieve next audio signal refering to recall_id
Parameters
audio_signal |
a |
[element-type AgsAudio.AudioSignal][transfer none] |
recall_id |
matching AgsRecallID |
Returns
matching
[element-type AgsAudio.AudioSignal][transfer none]
Since:
ags_audio_signal_is_active ()
gboolean ags_audio_signal_is_active (,
GList *audio_signal);
GObject *recall_id
Check if is active.
Parameters
audio_signal |
the |
[element-type AgsAudio.AudioSignal][transfer none] |
recall_id |
the AgsRecallID |
Since:
ags_audio_signal_new ()
AgsAudioSignal * ags_audio_signal_new (,
GObject *output_soundcard,
GObject *recycling);
GObject *recall_id
Creates a AgsAudioSignal, with defaults of output_soundcard
, linking recycling
tree
and refering to recall_id
.
Parameters
output_soundcard |
the assigned output |
|
recycling |
the AgsRecycling |
|
recall_id |
the AgsRecallID, it can be NULL if |
Since:
ags_audio_signal_new_with_length ()
AgsAudioSignal * ags_audio_signal_new_with_length (,
GObject *output_soundcard,
GObject *recycling,
GObject *recall_id);
guint length
Creates a AgsAudioSignal, with defaults of soundcard
, linking recycling
tree
and refering to recall_id
.
The audio data is tiled to length
frame count.
Parameters
output_soundcard |
the assigned output |
|
recycling |
the AgsRecycling |
|
recall_id |
the AgsRecallID, it can be NULL if |
|
length |
audio data frame count |
Since:
AGS_AUDIO_SIGNAL()
#define AGS_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUDIO_SIGNAL, AgsAudioSignal))
AGS_AUDIO_SIGNAL_CLASS()
#define AGS_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUDIO_SIGNAL, AgsAudioSignalClass))
AGS_AUDIO_SIGNAL_GET_CLASS()
#define AGS_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_AUDIO_SIGNAL, AgsAudioSignalClass))
AGS_IS_AUDIO_SIGNAL()
#define AGS_IS_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUDIO_SIGNAL))
AGS_IS_AUDIO_SIGNAL_CLASS()
#define AGS_IS_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUDIO_SIGNAL))
Types and Values
enum AgsAudioSignalFlags
Enum values to control the behavior or indicate internal state of AgsAudioSignal by enable/disable as flags.
Property Details
The “attack”
property
“attack”guint
The attack to be used.
Owner: AgsAudioSignal
Flags: Read / Write
Default value: 0
Since:
The “buffer-size”
property
“buffer-size”guint
The buffer size to be used.
Owner: AgsAudioSignal
Flags: Read / Write
Default value: 0
Since:
The “damping”
property
“damping”AgsComplex *
Damping of timbre.
Owner: AgsAudioSignal
Flags: Read / Write
Since:
The “delay”
property
“delay”double
The delay to be used.
Owner: AgsAudioSignal
Flags: Read / Write
Allowed values: >= 0
Default value: 0
Since:
The “first-frame”
property
“first-frame”guint
The first frame of stream.
Owner: AgsAudioSignal
Flags: Read / Write
Default value: 0
Since:
The “format”
property
“format”guint
The format to be used.
Owner: AgsAudioSignal
Flags: Read / Write
Default value: 0
Since:
The “frame-count”
property
“frame-count”guint
The initial size of audio data.
Owner: AgsAudioSignal
Flags: Read / Write
Default value: 0
Since:
The “input-soundcard”
property
“input-soundcard”GObject *
The assigned input
Owner: AgsAudioSignal
Flags: Read / Write
Since:
The “input-soundcard-channel”
property
“input-soundcard-channel”int
The input soundcard channel.
Owner: AgsAudioSignal
Flags: Read / Write
Allowed values: >= -1
Default value: 0
Since:
The “last-frame”
property
“last-frame”guint
The last frame of stream.
Owner: AgsAudioSignal
Flags: Read / Write
Default value: 0
Since:
The “length”
property
“length”guint
The length of the stream.
Owner: AgsAudioSignal
Flags: Read / Write
Default value: 0
Since:
The “loop-end”
property
“loop-end”guint
The loop end of stream.
Owner: AgsAudioSignal
Flags: Read / Write
Default value: 0
Since:
The “loop-start”
property
“loop-start”guint
The loop start of stream.
Owner: AgsAudioSignal
Flags: Read / Write
Default value: 0
Since:
The “note”
property
“note”gpointer
The assigned AgsNote providing default settings.
[transfer full]
Owner: AgsAudioSignal
Flags: Read / Write
Since:
The “output-soundcard”
property
“output-soundcard”GObject *
The assigned output
Owner: AgsAudioSignal
Flags: Read / Write
Since:
The “output-soundcard-channel”
property
“output-soundcard-channel”int
The output soundcard channel.
Owner: AgsAudioSignal
Flags: Read / Write
Allowed values: >= -1
Default value: 0
Since:
The “recall-id”
property
“recall-id” AgsRecallID *
The assigned AgsRecallID providing context.
Owner: AgsAudioSignal
Flags: Read / Write
Since:
The “recycling”
property
“recycling” AgsRecycling *
The assigned AgsRecycling linking tree.
Owner: AgsAudioSignal
Flags: Read / Write
Since:
The “rt-template”
property
“rt-template” AgsAudioSignal *
The assigned AgsAudioSignal realtime template.
Owner: AgsAudioSignal
Flags: Read / Write
Since:
The “samplerate”
property
“samplerate”guint
The samplerate to be used.
Owner: AgsAudioSignal
Flags: Read / Write
Default value: 0
Since:
The “stream”
property
“stream”gpointer
The stream it contains.
Owner: AgsAudioSignal
Flags: Read
Since:
The “stream-current”
property
“stream-current”gpointer
The current stream.
Owner: AgsAudioSignal
Flags: Read
Since:
The “stream-end”
property
“stream-end”gpointer
The end of stream.
Owner: AgsAudioSignal
Flags: Read
Since:
The “template”
property
“template” AgsAudioSignal *
The assigned AgsAudioSignal template.
Owner: AgsAudioSignal
Flags: Read / Write
Since:
The “timbre-end”
property
“timbre-end”guint
The timbre's end frame.
Owner: AgsAudioSignal
Flags: Read / Write
Default value: 0
Since:
The “timbre-start”
property
“timbre-start”guint
The timbre's start frame.
Owner: AgsAudioSignal
Flags: Read / Write
Default value: 0
Since:
The “vibration”
property
“vibration”AgsComplex *
Vibration of timbre.
Owner: AgsAudioSignal
Flags: Read / Write
Since:
Signal Details
The “add-note”
signal
void user_function (AgsAudioSignal *audio_signal,GObject *note,gpointer user_data)
The ::add-note signal notifies about adding note
.
Parameters
audio_signal |
the AgsAudioSignal |
|
note |
the AgsNote |
|
user_data |
user data set when the signal handler was connected. |
Flags:
Since:
The “refresh-data”
signal
void user_function (AgsAudioSignal *audio_signal,gpointer user_data)
The ::refresh-data signal notifies about requesting to refresh data.
Parameters
audio_signal |
the AgsAudioSignal |
|
user_data |
user data set when the signal handler was connected. |
Flags:
Since:
The “remove-note”
signal
void user_function (AgsAudioSignal *audio_signal,GObject *note,gpointer user_data)
The ::remove-note signal notifies about removing note
.
Parameters
audio_signal |
the AgsAudioSignal |
|
note |
the AgsNote |
|
user_data |
user data set when the signal handler was connected. |
Flags:
Since: