| Top |
| gboolean | ags_sound_resource_open () |
| gboolean | ags_sound_resource_rw_open () |
| void | ags_sound_resource_load () |
| void | ags_sound_resource_info () |
| void | ags_sound_resource_set_presets () |
| void | ags_sound_resource_get_presets () |
| guint | ags_sound_resource_read () |
| void | ags_sound_resource_write () |
| void | ags_sound_resource_flush () |
| void | ags_sound_resource_seek () |
| GList * | ags_sound_resource_read_audio_signal () |
| GList * | ags_sound_resource_read_wave () |
| void | ags_sound_resource_close () |
| #define | AGS_IS_SOUND_RESOURCE() |
| #define | AGS_IS_SOUND_RESOURCE_INTERFACE() |
| #define | AGS_SOUND_RESOURCE() |
| #define | AGS_SOUND_RESOURCE_GET_INTERFACE() |
| #define | AGS_SOUND_RESOURCE_INTERFACE() |
| GType | ags_sound_resource_get_type () |
gboolean ags_sound_resource_open (AgsSoundResource *sound_resource,gchar *filename);
Open sound_resource
for reading and assign filename.
Since: 2.0.0
gboolean ags_sound_resource_rw_open (AgsSoundResource *sound_resource,gchar *filename,guint audio_channels,guint samplerate,gboolean create);
Open sound_resource
for reading/writing and assign filename. Setting
create
to TRUE causes to create the file if it doesn't exist.
Since: 2.0.0
void
ags_sound_resource_load (AgsSoundResource *sound_resource);
Load audio data of sound_resource
.
Since: 2.0.0
void ags_sound_resource_info (AgsSoundResource *sound_resource,guint *frame_count,guint *loop_start,guint *loop_end);
Get information about sound_resource
.
sound_resource |
the AgsSoundResource |
|
frame_count |
return location of frame count |
|
loop_start |
return location of loop-start |
|
loop_end |
return location of loop-end |
Since: 2.0.0
void ags_sound_resource_set_presets (AgsSoundResource *sound_resource,guint channels,guint samplerate,guint buffer_size,guint format);
Set presets of sound_resource
.
sound_resource |
the AgsSoundResource |
|
channels |
channels to set |
|
samplerate |
samplerate to set |
|
buffer_size |
buffer-size to set |
|
format |
format to set |
Since: 2.0.0
void ags_sound_resource_get_presets (AgsSoundResource *sound_resource,guint *channels,guint *samplerate,guint *buffer_size,guint *format);
Get presets of sound_resource
.
sound_resource |
the AgsSoundResource |
|
channels |
return location of channels |
|
samplerate |
return location of samplerate |
|
buffer_size |
return location of buffer-size |
|
format |
return location of format |
Since: 2.0.0
guint ags_sound_resource_read (AgsSoundResource *sound_resource,void *dbuffer,guint daudio_channels,guint audio_channel,guint frame_count,guint format);
Read frame_count
number of frames from sound_resource
and copy the data
to dbuffer
using format
by skipping daudio_channels
.
sound_resource |
the AgsSoundResource |
|
dbuffer |
the destination buffer |
|
daudio_channels |
destination buffer audio channel count |
|
audio_channel |
the audio channel to read |
|
frame_count |
the frame count to read |
|
format |
the format to read |
Since: 2.0.0
void ags_sound_resource_write (AgsSoundResource *sound_resource,void *sbuffer,guint saudio_channels,guint audio_channel,guint frame_count,guint format);
Write sbuffer
to sound_resource
frame_count
number of
frames having format
by skipping saudio_channels
.
sound_resource |
the AgsSoundResource |
|
sbuffer |
the source buffer |
|
saudio_channels |
source buffer audio channel count |
|
audio_channel |
the audio channel |
|
frame_count |
the frame count to write |
|
format |
the format to write |
Since: 2.0.0
void
ags_sound_resource_flush (AgsSoundResource *sound_resource);
Flush sound_resource
.
Since: 2.0.0
void ags_sound_resource_seek (AgsSoundResource *sound_resource,gint64 frame_count,gint whence);
Seek the sound_resource
frame_count
from whence
.
sound_resource |
the AgsSoundResource |
|
frame_count |
the frame count |
|
whence |
SEEK_SET, SEEK_CUR or SEEK_END |
Since: 2.0.0
GList * ags_sound_resource_read_audio_signal (AgsSoundResource *sound_resource,GObject *soundcard,gint audio_channel);
Read audio signal from sound_resource
.
sound_resource |
the AgsSoundResource |
|
soundcard |
the AgsSoundcard |
|
audio_channel |
the audio channel or -1 for all |
Since: 2.0.0
GList * ags_sound_resource_read_wave (AgsSoundResource *sound_resource,GObject *soundcard,gint audio_channel,guint64 x_offset,gdouble delay,guint attack);
Read wave from sound_resource
.
sound_resource |
the AgsSoundResource |
|
soundcard |
the AgsSoundcard |
|
audio_channel |
the audio channel or -1 for all |
|
x_offset |
the x offset |
|
delay |
the delay |
|
attack |
the attack |
Since: 2.0.0
void
ags_sound_resource_close (AgsSoundResource *sound_resource);
Close sound_resource
.
Since: 2.0.0
#define AGS_IS_SOUND_RESOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SOUND_RESOURCE))
#define AGS_IS_SOUND_RESOURCE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_SOUND_RESOURCE))
#define AGS_SOUND_RESOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SOUND_RESOURCE, AgsSoundResource))
#define AGS_SOUND_RESOURCE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_SOUND_RESOURCE, AgsSoundResourceInterface))
#define AGS_SOUND_RESOURCE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_SOUND_RESOURCE, AgsSoundResourceInterface))
struct AgsSoundResourceInterface {
GTypeInterface ginterface;
gboolean (*open)(AgsSoundResource *sound_resource,
gchar *filename);
gboolean (*rw_open)(AgsSoundResource *sound_resource,
gchar *filename,
guint audio_channels, guint samplerate,
gboolean create);
void (*load)(AgsSoundResource *sound_resource);
void (*info)(AgsSoundResource *sound_resource,
guint *frame_count,
guint *loop_start, guint *loop_end);
void (*set_presets)(AgsSoundResource *sound_resource,
guint channels,
guint samplerate,
guint buffer_size,
guint format);
void (*get_presets)(AgsSoundResource *sound_resource,
guint *channels,
guint *samplerate,
guint *buffer_size,
guint *format);
/* read sample data */
guint (*read)(AgsSoundResource *sound_resource,
void *dbuffer, guint daudio_channels,
guint audio_channel,
guint frame_count, guint format);
/* write sample data */
void (*write)(AgsSoundResource *sound_resource,
void *sbuffer, guint saudio_channels,
guint audio_channel,
guint frame_count, guint format);
void (*flush)(AgsSoundResource *sound_resource);
/* position */
void (*seek)(AgsSoundResource *sound_resource,
gint64 frame_count, gint whence);
/* close */
void (*close)(AgsSoundResource *sound_resource);
};