![]() |
![]() |
![]() |
GPS04 Reference Manual | ![]() |
---|---|---|---|---|
#include <PS04-audio-track-matrix.h> PS04AudioTrackMatrix; #define PS04_N_AUDIO_CHANNELS #define PS04_N_AUDIO_VTAKES PS04AudioTrackMatrix* ps04_audio_track_matrix_new (void); void ps04_audio_track_matrix_copy_from (PS04AudioTrackMatrix *self, const PS04AudioTrackMatrix *other); const char* ps04_audio_track_matrix_format_track_name (guint track, guint vtake); gulong ps04_audio_track_matrix_get_total_file_size (const PS04AudioTrackMatrix *self); PS04AudioTrack* ps04_audio_track_matrix_get_track (PS04AudioTrackMatrix *self, guint track, guint vtake); gboolean ps04_audio_track_matrix_has_track (const PS04AudioTrackMatrix *self, guint track, guint vtake); void ps04_audio_track_matrix_set (PS04AudioTrackMatrix *self, const char *folder_path, guint project_no, GError **error); gulong ps04_audio_track_matrix_get_max_samples (const PS04AudioTrackMatrix *self);
The PS04AudioTrackMatrix class is a container for all the audio tracks of a PS04Project, ordered as a two-dimensional matrix by track and virtual take.
PS04AudioTrackMatrix* ps04_audio_track_matrix_new (void);
Creates a new, empty matrix.
Returns : | a new PS04AudioTrackMatrix. |
void ps04_audio_track_matrix_copy_from (PS04AudioTrackMatrix *self, const PS04AudioTrackMatrix *other);
Makes this matrix a copy of the other
. Tracks are copied by reference.
self : |
An PS04AudioTrackMatrix. |
other : |
Another PS04AudioTrackMatrix to copy from. |
const char* ps04_audio_track_matrix_format_track_name (guint track, guint vtake);
Formats a display string of track and v-take number.
track : |
The track index (0–PS04_N_AUDIO_CHANNELS) |
vtake : |
The v-take index (0–PS04_N_AUDIO_VTAKES) |
Returns : | a static buffer where the string gets stored. This function is therefore not thread-safe. |
gulong ps04_audio_track_matrix_get_total_file_size (const PS04AudioTrackMatrix *self);
Gets the total file size of all audio tracks.
self : |
An PS04AudioTrackMatrix. |
Returns : | total file size in bytes. |
PS04AudioTrack* ps04_audio_track_matrix_get_track (PS04AudioTrackMatrix *self, guint track, guint vtake);
Gets the track at (track,vtake).
self : |
An PS04AudioTrackMatrix. |
track : |
The track index of the track to get. |
vtake : |
The v-take index of the track to get. |
Returns : | a PS04AudioTrack. |
gboolean ps04_audio_track_matrix_has_track (const PS04AudioTrackMatrix *self, guint track, guint vtake);
Gets if the track (track
,vtake
) is non-empty.
self : |
An PS04AudioTrackMatrix. |
track : |
The track index of the track to test. |
vtake : |
The v-take index of the track to test. |
Returns : | TRUE if the track has audio, FALSE if it's empty.
|
void ps04_audio_track_matrix_set (PS04AudioTrackMatrix *self, const char *folder_path, guint project_no, GError **error);
Sets the project containing the matrix, rereading all contained tracks.
self : |
An PS04AudioTrackMatrix. |
folder_path : |
A path to the project folder. |
project_no : |
The project number within the folder. |
error : |
gulong ps04_audio_track_matrix_get_max_samples (const PS04AudioTrackMatrix *self);
self : |
|
Returns : |