Top |
Functions
Types and Values
#define | AGS_MIDI_FILE_MAX_TEXT_LENGTH |
#define | AGS_MIDI_FILE_MTHD |
#define | AGS_MIDI_FILE_MTRK |
#define | AGS_MIDI_FILE_DEFAULT_OFFSET |
#define | AGS_MIDI_FILE_DEFAULT_FORMAT |
#define | AGS_MIDI_FILE_DEFAULT_BEATS |
#define | AGS_MIDI_FILE_DEFAULT_FPS |
#define | AGS_MIDI_FILE_DEFAULT_TICKS |
enum | AgsMidiFileStatus |
enum | AgsMidiFileFlags |
#define | AGS_MIDI_FILE_ERROR |
enum | AgsMidiFileError |
struct | AgsMidiFileTrack |
Functions
AGS_MIDI_FILE_GET_OBJ_MUTEX()
#define AGS_MIDI_FILE_GET_OBJ_MUTEX(obj) (&(((AgsMidiFile *) obj)->obj_mutex))
ags_midi_file_open ()
gboolean ags_midi_file_open (AgsMidiFile *midi_file
,);
gchar *filename
Opens a MIDI file read-only.
Since:
ags_midi_file_open_from_data ()
gboolean ags_midi_file_open_from_data (AgsMidiFile *midi_file
,unsigned
,char *data);
guint buffer_length
Opens a virtual MIDI file residing in data
's array.
Since:
ags_midi_file_rw_open ()
gboolean ags_midi_file_rw_open (AgsMidiFile *midi_file
,,
gchar *filename);
gboolean create
Opens a MIDI file with read-write permission.
Parameters
midi_file |
the AgsMidiFile |
|
filename |
the filename |
|
create |
|
Since:
ags_midi_file_close ()
void ags_midi_file_close (AgsMidiFile *midi_file
);
Closes the file stream.
Since:
ags_midi_file_read ()
unsignedchar * ags_midi_file_read (AgsMidiFile *midi_file
);
Reads all bytes of the file's stream and stores them in the internal buffer.
Since:
ags_midi_file_write ()
void ags_midi_file_write (AgsMidiFile *midi_file
,unsigned
,char *data);
guint buffer_length
Writes data
to the file stream and to internal buffer, reallocates it if necessary.
Since:
ags_midi_file_seek ()
void ags_midi_file_seek (AgsMidiFile *midi_file
,,
guint position);
gint whence
Seeks the file stream's offset.
Since:
ags_midi_file_flush ()
void ags_midi_file_flush (AgsMidiFile *midi_file
);
Flushes file stream's data buffer to disc.
Since:
ags_midi_file_read_byte ()
unsignedchar ags_midi_file_read_byte (AgsMidiFile *midi_file
,);
GError **error
Reads a unsigned char quantity.
Since:
ags_midi_file_read_gint16 ()
gint16 ags_midi_file_read_gint16 (AgsMidiFile *midi_file
,);
GError **error
Reads a gint16 quantity.
Since:
ags_midi_file_read_gint24 ()
gint32 ags_midi_file_read_gint24 (AgsMidiFile *midi_file
,);
GError **error
Reads a 24-bit quantity.
Since:
ags_midi_file_read_gint32 ()
gint32 ags_midi_file_read_gint32 (AgsMidiFile *midi_file
,);
GError **error
Reads a gint32 quantity.
Since:
ags_midi_file_read_varlength ()
long ags_midi_file_read_varlength (AgsMidiFile *midi_file
,);
GError **error
Reads a variable length quantity.
Since:
ags_midi_file_read_text ()
unsignedchar * ags_midi_file_read_text (AgsMidiFile *midi_file
,,
gint length);
GError **error
Reads a string.
Parameters
midi_file |
the AgsMidiFile |
|
length |
the number of bytes to be read, or as long valid string for -1 |
|
error |
the |
Since:
ags_midi_file_write_byte ()
void ags_midi_file_write_byte (AgsMidiFile *midi_file
,unsigned
);char val
Writes a unsigned char quantity to internal buffer.
Since:
ags_midi_file_write_gint16 ()
void ags_midi_file_write_gint16 (AgsMidiFile *midi_file
,);
gint16 val
Writes a gint16 quantity to internal buffer.
Since:
ags_midi_file_write_gint24 ()
void ags_midi_file_write_gint24 (AgsMidiFile *midi_file
,);
gint32 val
Writes a 24-bit quantity to internal buffer.
Since:
ags_midi_file_write_gint32 ()
void ags_midi_file_write_gint32 (AgsMidiFile *midi_file
,);
gint32 val
Writes a gint32 quantity to internal buffer.
Since:
ags_midi_file_write_varlength ()
void ags_midi_file_write_varlength (AgsMidiFile *midi_file
,long
);val Param2
ags_midi_file_write_text ()
void ags_midi_file_write_text (AgsMidiFile *midi_file
,,
gchar *text);
guint length
Writes a string to internal buffer up to length bytes.
Since:
ags_midi_file_read_header ()
unsignedchar * ags_midi_file_read_header (AgsMidiFile *midi_file
,,
guint *buffer_length);
GError **error
Reads the MIDI file's header and positions internal buffer pointer just behind it.
Parameters
midi_file |
the AgsMidiFile |
|
buffer_length |
pointer to return buffer length or |
|
error |
the |
Since:
ags_midi_file_write_header ()
void ags_midi_file_write_header (AgsMidiFile *midi_file
,unsigned
,char *buffer);
guint buffer_length
Write header bytes.
Parameters
midi_file |
the AgsMidiFile |
|
buffer |
the buffer to write |
|
buffer_length |
the length of the buffer |
Since:
ags_midi_file_read_track_data ()
unsignedchar * ags_midi_file_read_track_data (AgsMidiFile *midi_file
,,
guint *buffer_length);
GError **error
Reads the MIDI file's track data.
Parameters
midi_file |
the AgsMidiFile |
|
buffer_length |
pointer to return buffer length or |
|
error |
the |
Since:
ags_midi_file_write_track_data ()
void ags_midi_file_write_track_data (AgsMidiFile *midi_file
,unsigned
,char *buffer);
guint buffer_length
ags_midi_file_new ()
AgsMidiFile *
ags_midi_file_new (gchar *filename
);
Create a new instance of AgsMidiFile
Since: