Advanced Gtk+ Sequencer Reference Manual | ||||
---|---|---|---|---|
Top | Description |
#include <ags/audio/ags_audio_signal.h> AgsAttack; enum AgsAttackFlags; struct AgsAudioSignal; struct AgsAudioSignalClass; enum AgsAudioSignalFlags;void ags_audio_signal_add_stream (AgsAudioSignal *audio_signal
);void ags_audio_signal_copy_buffer_to_buffer (signed
,short *destination,
guint dchannelssigned
,short *source,
guint schannels);
guint sizevoid ags_audio_signal_copy_buffer_to_double_buffer (,
double *destination,
guint dchannelssigned
,short *source,
guint schannels);
guint sizevoid ags_audio_signal_copy_double_buffer_to_buffer (signed
,short *destination,
guint dchannels,
double *source,
guint schannels);
guint sizevoid ags_audio_signal_duplicate_stream (AgsAudioSignal *audio_signal
,AgsAudioSignal *template
);GList * ags_audio_signal_get_by_recall_id (,
GList *audio_signal);
GObject *recall_idguint ags_audio_signal_get_length_till_current (AgsAudioSignal *audio_signal
);GList * ags_audio_signal_get_stream_current (,
GList *audio_signal); AgsAudioSignal * ags_audio_signal_get_template (
GObject *recall_id);
GList *audio_signalvoid ags_audio_signal_morph_samplerate (AgsAudioSignal *audio_signal
,,
guint samplerate); AgsAudioSignal * ags_audio_signal_new (
double k_morph,
GObject *devout,
GObject *recycling); AgsAudioSignal * ags_audio_signal_new_with_length (
GObject *recall_id,
GObject *devout,
GObject *recycling,
GObject *recall_id);
guint lengthvoid ags_audio_signal_realloc_buffer_size (AgsAudioSignal *audio_signal
,);
guint buffer_sizevoid ags_audio_signal_scale (AgsAudioSignal *audio_signal
,AgsAudioSignal *template
,);
guint lengthvoid ags_audio_signal_stream_resize (AgsAudioSignal *audio_signal
,);
guint lengthvoid ags_audio_signal_stream_safe_resize (AgsAudioSignal *audio_signal
,);
guint lengthvoid ags_audio_signal_tile (AgsAudioSignal *audio_signal
,AgsAudioSignal *template
,); signed
guint lengthshort * ags_stream_alloc ();
guint buffer_size
typedef enum { AGS_ATTACK_INITIAL_RUN = 1, AGS_ATTACK_SWAP = 1 << 1, } AgsAttackFlags;
struct AgsAudioSignal { GObject object; guint flags; GObject *devout; GObject *recycling; GObject *recall_id; // AGS_TYPE_RECALL_ID to identify the AgsAudioSignal guint samplerate; guint buffer_size; guint resolution; guint length; guint last_frame; // the last frame at stream_end guint loop_start; guint loop_end; gdouble delay; guint attack; guint lock_attack; GList *stream_beginning; GList *stream_current; GList *stream_end; };
struct AgsAudioSignalClass { GObjectClass object; void (*realloc_buffer_size)(AgsAudioSignal *audio_signal, guint buffer_size); void (*morph_samplerate)(AgsAudioSignal *audio_signal, guint samplerate, double k_morph); };
typedef enum { AGS_AUDIO_SIGNAL_TEMPLATE = 1, AGS_AUDIO_SIGNAL_PLAY_DONE = 1 << 1, AGS_AUDIO_SIGNAL_STANDALONE = 1 << 2, } AgsAudioSignalFlags;
void ags_audio_signal_add_stream (AgsAudioSignal *audio_signal
);
Adds a buffer at the end of the stream.
|
an AgsAudioSignal |
Since 0.3
void ags_audio_signal_copy_buffer_to_buffer (signed
,short *destination,
guint dchannelssigned
,short *source,
guint schannels);
guint size
Copy a buffer to an other buffer.
|
destination buffer |
|
destination audio channels |
|
source buffer |
|
source audio channels |
|
frame count to copy |
Since 0.3
void ags_audio_signal_copy_buffer_to_double_buffer (,
double *destination,
guint dchannelssigned
,short *source,
guint schannels);
guint size
Copy a buffer to an other buffer.
|
destination buffer |
|
destination audio channels |
|
source buffer |
|
source audio channels |
|
frame count to copy |
Since 0.4
void ags_audio_signal_copy_double_buffer_to_buffer (signed
,short *destination,
guint dchannels,
double *source,
guint schannels);
guint size
Copy a buffer to an other buffer.
|
destination buffer |
|
destination audio channels |
|
source buffer |
|
source audio channels |
|
frame count to copy |
Since 0.4
void ags_audio_signal_duplicate_stream (AgsAudioSignal *audio_signal
,AgsAudioSignal *template
);
Copy stream of one audio signal to another
|
destination AgsAudioSignal |
|
source AgsAudioSignal |
Since 0.3
GList * ags_audio_signal_get_by_recall_id (,
GList *audio_signal);
GObject *recall_id
Retrieve next audio signal refering to recall_id
|
a |
|
matching AgsRecallID |
Returns : |
matching AgsAudioSignal |
Since 0.3
guint ags_audio_signal_get_length_till_current (AgsAudioSignal *audio_signal
);
Counts the buffers from stream_beginning upto stream_current.
|
an AgsAudioSignal |
Returns : |
the counted length. |
Since 0.4
GList * ags_audio_signal_get_stream_current (,
GList *audio_signal);
GObject *recall_id
Retrieve next current stream of AgsAudioSignal list.
|
a |
|
the matching AgsRecallID |
Returns : |
next |
Since 0.4
AgsAudioSignal * ags_audio_signal_get_template (GList *audio_signal
);
Retrieve the template audio signal.
|
a |
Returns : |
the template AgsAudioSignal |
Since 0.3
void ags_audio_signal_morph_samplerate (AgsAudioSignal *audio_signal
,,
guint samplerate);
double k_morph
Morph audio quality to new samplerate.
|
an AgsAudioSignal |
|
the new samplerate |
|
reserved for future usage |
Since 0.4
AgsAudioSignal * ags_audio_signal_new (,
GObject *devout,
GObject *recycling);
GObject *recall_id
Creates a AgsAudioSignal, with defaults of devout
, linking recycling
tree
and refering to recall_id
.
|
the assigned AgsDevout |
|
the AgsRecycling |
|
the AgsRecallID, it can be NULL if AGS_AUDIO_SIGNAL_TEMPLATE |
Returns : |
a new AgsAudioSignal |
Since 0.3
AgsAudioSignal * ags_audio_signal_new_with_length (,
GObject *devout,
GObject *recycling,
GObject *recall_id);
guint length
Creates a AgsAudioSignal, with defaults of devout
, linking recycling
tree
and refering to recall_id
.
The audio data is tiled to length
frame count.
|
the assigned AgsDevout |
|
the AgsRecycling |
|
the AgsRecallID, it can be NULL if AGS_AUDIO_SIGNAL_TEMPLATE |
|
audio data frame count |
Returns : |
a new AgsAudioSignal |
Since 0.4
void ags_audio_signal_realloc_buffer_size (AgsAudioSignal *audio_signal
,);
guint buffer_size
Realloc the stream to the new buffer size.
|
an AgsAudioSignal |
|
the buffer size |
Since 0.4
void ags_audio_signal_scale (AgsAudioSignal *audio_signal
,AgsAudioSignal *template
,);
guint length
Scale audio signal data.
|
an AgsAudioSignal |
|
the source AgsAudioSignal |
|
new frame count |
Since 0.4
void ags_audio_signal_stream_resize (AgsAudioSignal *audio_signal
,);
guint length
Resizes an AgsAudioSignal's stream but be carefull with shrinking. This function may crash the application.
|
an AgsAudioSignal to resize. |
|
a guint as the new length. |
Since 0.3
void ags_audio_signal_stream_safe_resize (AgsAudioSignal *audio_signal
,);
guint length
Resizes an AgsAudioSignal's stream but doesn't shrink more than the current stream position.
|
an AgsAudioSignal |
|
a guint |
Since 0.4
void ags_audio_signal_tile (AgsAudioSignal *audio_signal
,AgsAudioSignal *template
,);
guint length
Tile audio signal data.
|
an AgsAudioSignal |
|
the source AgsAudioSignal |
|
new frame count |
Since 0.4