Top | ![]() |
![]() |
![]() |
![]() |
Contains all information needed to show a wave form. It's produced by
PtPlayer or PtWaveloader. Pass it to PtWaveviewer to visualize the wave.
PtWaveviewer copies the data, you can free it immediately with pt_wavedata_free()
.
There is no need to access the struct members.
Assuming you have set up a PtPlayer *player, typical usage would be:
1 2 3 4 5 6 |
... PtWavedata *data; data = pt_player_get_data (player, 100); pt_waveviewer_set_wave (PT_WAVEVIEWER (waveviewer), data); pt_wavedata_free (data); ... |
PtWavedata * pt_wavedata_new (gfloat *array
,gint64 length
,guint channels
,guint px_per_sec
);
Constructs a new PtWavedata.
[constructor]
PtWavedata *
pt_wavedata_copy (PtWavedata *data
);
Creates a copy of data
.
[skip]
struct PtWavedata { gfloat *array; gint64 length; guint channels; guint px_per_sec; };
Contains all information about the wave. Usually you don't have to access the struct's members.
gfloat * |
array of min/max values. One single sample is represented by a min value ranging from -1.0 to 0.0 and a max value ranging from 0.0 to 1.0. This is a simplified approach, as a sample is not a single point in time, but a min and a max value in a certain amount of time, e.g. 10 ms. |
[array length=length] |
gint64 |
number of elements in array |
|
guint |
number of channels for future use, currently it's always 1. |
|
guint |
pixels/samples per second. For example 100 means one second in time is 100 pixels wide. |