Top |
Functions
|
ags_sound_resource_open () |
|
ags_sound_resource_rw_open () |
|
ags_sound_resource_load () |
|
ags_sound_resource_info () |
|
ags_sound_resource_set_presets () |
|
ags_sound_resource_get_presets () |
|
ags_sound_resource_read () |
|
ags_sound_resource_write () |
|
ags_sound_resource_flush () |
|
ags_sound_resource_seek () |
|
ags_sound_resource_read_audio_signal () |
|
ags_sound_resource_read_wave () |
|
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() |
|
ags_sound_resource_get_type () |
Known Implementations
AgsSoundResource is implemented by AgsIpatchSample, AgsSFZSample and AgsSndfile.
Functions
ags_sound_resource_open ()
gboolean ags_sound_resource_open (AgsSoundResource *sound_resource
,);
gchar *filename
Open sound_resource
for reading and assign filename.
Since:
ags_sound_resource_rw_open ()
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
Parameters
sound_resource |
the AgsSoundResource |
|
filename |
the filename as string |
|
audio_channels |
the audio channels count |
|
samplerate |
the samplerate |
|
create |
if |
Since:
ags_sound_resource_load ()
void ags_sound_resource_load (AgsSoundResource *sound_resource
);
Load audio data of sound_resource
.
Since:
ags_sound_resource_info ()
void ags_sound_resource_info (AgsSoundResource *sound_resource
,,
guint *frame_count,
guint *loop_start);
guint *loop_end
Get information about sound_resource
.
Parameters
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:
ags_sound_resource_set_presets ()
void ags_sound_resource_set_presets (AgsSoundResource *sound_resource
,,
guint channels,
guint samplerate,
guint buffer_size);
guint format
Set presets of sound_resource
.
Parameters
sound_resource |
the AgsSoundResource |
|
channels |
channels to set |
|
samplerate |
samplerate to set |
|
buffer_size |
buffer-size to set |
|
format |
format to set |
Since:
ags_sound_resource_get_presets ()
void ags_sound_resource_get_presets (AgsSoundResource *sound_resource
,,
guint *channels,
guint *samplerate,
guint *buffer_size);
guint *format
Get presets of sound_resource
.
Parameters
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:
ags_sound_resource_read ()
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
.
Parameters
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:
ags_sound_resource_write ()
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
.
Parameters
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:
ags_sound_resource_flush ()
void ags_sound_resource_flush (AgsSoundResource *sound_resource
);
Flush sound_resource
.
Since:
ags_sound_resource_seek ()
void ags_sound_resource_seek (AgsSoundResource *sound_resource
,,
gint64 frame_count);
gint whence
Seek the sound_resource
frame_count
from whence
.
Parameters
sound_resource |
the AgsSoundResource |
|
frame_count |
the frame count |
|
whence |
SEEK_SET, SEEK_CUR or SEEK_END |
Since:
ags_sound_resource_read_audio_signal ()
GList * ags_sound_resource_read_audio_signal (AgsSoundResource *sound_resource
,,
GObject *soundcard);
gint audio_channel
Read audio signal from sound_resource
.
Parameters
sound_resource |
the AgsSoundResource |
|
soundcard |
the |
|
audio_channel |
the audio channel or -1 for all |
Since:
ags_sound_resource_read_wave ()
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
.
Parameters
sound_resource |
the AgsSoundResource |
|
soundcard |
the |
|
audio_channel |
the audio channel or -1 for all |
|
x_offset |
the x offset |
|
delay |
the delay |
|
attack |
the attack |
Since:
ags_sound_resource_close ()
void ags_sound_resource_close (AgsSoundResource *sound_resource
);
Close sound_resource
.
Since:
AGS_IS_SOUND_RESOURCE()
#define AGS_IS_SOUND_RESOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SOUND_RESOURCE))
AGS_IS_SOUND_RESOURCE_INTERFACE()
#define AGS_IS_SOUND_RESOURCE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_SOUND_RESOURCE))
AGS_SOUND_RESOURCE()
#define AGS_SOUND_RESOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SOUND_RESOURCE, AgsSoundResource))
AGS_SOUND_RESOURCE_GET_INTERFACE()
#define AGS_SOUND_RESOURCE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_SOUND_RESOURCE, AgsSoundResourceInterface))
AGS_SOUND_RESOURCE_INTERFACE()
#define AGS_SOUND_RESOURCE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_SOUND_RESOURCE, AgsSoundResourceInterface))
Types and Values
struct 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); };