![]() |
![]() |
![]() |
GPS04 Reference Manual | ![]() |
---|---|---|---|---|
#include <PS04-streamable.h> PS04Streamable; PS04StreamableClass; long ps04_streamable_get_streamed_size (const PS04Streamable *streamable); void ps04_streamable_read_from_stream (PS04Streamable *streamable, PS04Stream *stream, GError **error); void ps04_streamable_write_to_stream (const PS04Streamable *streamable, PS04Stream *stream, GError **error);
PS04Streamable is implemented by PS04MixerChannel, PS04RhythmSongEvent, GPS04SmfTimeSignatureEvent, PS04Mixer, GPS04SmfTrack, GPS04MidiVariableLengthQuantity, GPS04MidiNoteOffEvent, GPS04MidiNoteOnEvent, PS04RhythmSong, GPS04SmfHeader, GPS04WavHeader, GPS04SmfTrackEvent, GPS04SmfEndOfTrackEvent and PS04RhythmPattern.
The PS04Streamable interface represents classes that can be streamed to and/or from a PS04Stream.
typedef struct { /* vtable */ gsize (*get_streamed_size) (const PS04Streamable *streamable); void (*read_from_stream) (PS04Streamable *streamable, PS04Stream *stream, GError **error); void (*write_to_stream) (const PS04Streamable *streamable, PS04Stream *stream, GError **error); } PS04StreamableClass;
long ps04_streamable_get_streamed_size (const PS04Streamable *streamable);
Gets the size of the streamable as it would appear in a stream.
streamable : |
A PS04Streamable. |
Returns : | the size in bytes. |
void ps04_streamable_read_from_stream (PS04Streamable *streamable, PS04Stream *stream, GError **error);
streamable : |
|
stream : |
|
error : |
void ps04_streamable_write_to_stream (const PS04Streamable *streamable, PS04Stream *stream, GError **error);
Writes the streamable to the supplied stream. If an error occurs,
error
is set.
streamable : |
A PS04Streamable. |
stream : |
A PS04Stream to write to. |
error : |
A placeholder for a GError, or NULL .
|