<< GtkWaveBuffer >>

GtkWaveBuffer is an interface containing uneditable wavebuffer. It is an abstract class meaning you should not instantiate it. It does not provide any functionality, only an interface. Instead, instantiate one of its subclasses.

Member functions:

GtkType         gtk_wave_buffer_get_type       (void);

Standard Gtk+ function returns GtkType of GtkWaveBuffer class.


guint32         gtk_wave_buffer_get_rate       (GtkWaveBuffer *wavebuffer);

Return the frame rate of the data source. Typical values include: 8000, 11025, 22050, 44100.


guint32         gtk_wave_buffer_get_num_channels (GtkWaveBuffer *wavebuffer);

Return the number of channels. Typical values: Mono = 1, Stereo = 2, etc.


guint32         gtk_wave_buffer_get_length     (GtkWaveBuffer *wavebuffer);

Return the length of the data source in number of frames. A frame is the group of samples for all channels at one point in time.


GtkWaveBufferType gtk_wave_buffer_get_datatype (GtkWaveBuffer *wavebuffer);

Return a GtkWaveBufferType. This is the data type of the samples. Values can be one of: GTK_WAVE_BUFFER_TYPE_S32, GTK_WAVE_BUFFER_TYPE_U32, GTK_WAVE_BUFFER_TYPE_S16, GTK_WAVE_BUFFER_TYPE_U16, GTK_WAVE_BUFFER_TYPE_S8, GTK_WAVE_BUFFER_TYPE_U8, GTK_WAVE_BUFFER_TYPE_F4, GTK_WAVE_BUFFER_TYPE_F8.


void            gtk_wave_buffer_get_samples    (GtkWaveBuffer *wavebuffer,
                                                guint32        start,
                                                guint32        length,
                                                guint32        channel_mask,
                                                gpointer       data);

Copy data from the data source starting at a given frame, ending after the given length, using channels as specified in the bitmask channel_mask to a preallocated block in memory of data. Channels may be ignored by storing their corresponding bit in the bitmask as a zero. You can retrieve the first two channels of a four channel data source by specifying a channel_mask of 0x00000003. The data will be stored in consecutive frames without any padding. Samples will be stored like this: [1][2][1][2][1][2], where a number represents a sample for a channel. If you set the channel_mask to 0xffffffff, then all available channels will be extracted. If there are less than 32 channels then the upper bits in the mask will be ignored.

GtkWaveBuffer