| Top |
| #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 |
#define AGS_MIDI_FILE_GET_OBJ_MUTEX(obj) (&(((AgsMidiFile *) obj)->obj_mutex))
gboolean ags_midi_file_open (AgsMidiFile *midi_file,gchar *filename);
Opens a MIDI file read-only.
Since: 3.0.0
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: 3.0.0
gboolean ags_midi_file_rw_open (AgsMidiFile *midi_file,gchar *filename,gboolean create);
Opens a MIDI file with read-write permission.
midi_file |
the AgsMidiFile |
|
filename |
the filename |
|
create |
|
Since: 3.0.0
void
ags_midi_file_close (AgsMidiFile *midi_file);
Closes the file stream.
Since: 3.0.0
unsigned char *
ags_midi_file_read (AgsMidiFile *midi_file);
Reads all bytes of the file's stream and stores them in the internal buffer.
Since: 3.0.0
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: 3.0.0
void ags_midi_file_seek (AgsMidiFile *midi_file,guint position,gint whence);
Seeks the file stream's offset.
Since: 3.0.0
void
ags_midi_file_flush (AgsMidiFile *midi_file);
Flushes file stream's data buffer to disc.
Since: 3.0.0
unsigned char ags_midi_file_read_byte (AgsMidiFile *midi_file,GError **error);
Reads a unsigned char quantity.
Since: 3.0.0
gint16 ags_midi_file_read_gint16 (AgsMidiFile *midi_file,GError **error);
Reads a gint16 quantity.
Since: 3.0.0
gint32 ags_midi_file_read_gint24 (AgsMidiFile *midi_file,GError **error);
Reads a 24-bit quantity.
Since: 3.0.0
gint32 ags_midi_file_read_gint32 (AgsMidiFile *midi_file,GError **error);
Reads a gint32 quantity.
Since: 3.0.0
long ags_midi_file_read_varlength (AgsMidiFile *midi_file,GError **error);
Reads a variable length quantity.
Since: 3.0.0
unsigned char * ags_midi_file_read_text (AgsMidiFile *midi_file,gint length,GError **error);
Reads a string.
midi_file |
the AgsMidiFile |
|
length |
the number of bytes to be read, or as long valid string for -1 |
|
error |
the GError pointer return location |
Since: 3.0.0
void ags_midi_file_write_byte (AgsMidiFile *midi_file,unsigned char val);
Writes a unsigned char quantity to internal buffer.
Since: 3.0.0
void ags_midi_file_write_gint16 (AgsMidiFile *midi_file,gint16 val);
Writes a gint16 quantity to internal buffer.
Since: 3.0.0
void ags_midi_file_write_gint24 (AgsMidiFile *midi_file,gint32 val);
Writes a 24-bit quantity to internal buffer.
Since: 3.0.0
void ags_midi_file_write_gint32 (AgsMidiFile *midi_file,gint32 val);
Writes a gint32 quantity to internal buffer.
Since: 3.0.0
void ags_midi_file_write_varlength (AgsMidiFile *midi_file,long val Param2);
void ags_midi_file_write_text (AgsMidiFile *midi_file,gchar *text,guint length);
Writes a string to internal buffer up to length bytes.
Since: 3.0.0
unsigned char * 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.
midi_file |
the AgsMidiFile |
|
buffer_length |
pointer to return buffer length or |
|
error |
the GError pointer return location |
Since: 3.0.0
void ags_midi_file_write_header (AgsMidiFile *midi_file,unsigned char *buffer,guint buffer_length);
Write header bytes.
midi_file |
the AgsMidiFile |
|
buffer |
the buffer to write |
|
buffer_length |
the length of the buffer |
Since: 3.0.0
unsigned char * ags_midi_file_read_track_data (AgsMidiFile *midi_file,guint *buffer_length,GError **error);
Reads the MIDI file's track data.
midi_file |
the AgsMidiFile |
|
buffer_length |
pointer to return buffer length or |
|
error |
the GError pointer return location |
Since: 3.0.0
void ags_midi_file_write_track_data (AgsMidiFile *midi_file,unsigned char *buffer,guint buffer_length);
AgsMidiFile * ags_midi_file_new ();
Create a new instance of AgsMidiFile
Since: 3.0.0