| Buzztard Bt-Core Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals | ||||
BtWaveBtWave — one BtWavetable entry that keeps a list of BtWavelevels |
#include <libbtcore/core.h>
BtWave;
enum BtWaveLoopMode;
BtWave * bt_wave_new (const BtSong * const song,
const gchar * const name,
const gchar * const uri,
const gulong index,
const gdouble volume,
const BtWaveLoopMode loop_mode,
const guint channels);
gboolean bt_wave_add_wavelevel (const BtWave * const self,
const BtWavelevel * const wavelevel);
BtWavelevel * bt_wave_get_level_by_index (const BtWave * const self,
const gulong index);
"channels" guint : Read / Write / Construct "index" gulong : Read / Write / Construct "loop-mode" BtWaveLoopMode : Read / Write / Construct "name" gchar* : Read / Write / Construct "song" BtSong* : Read / Write / Construct Only "uri" gchar* : Read / Write / Construct "volume" gdouble : Read / Write / Construct "wavelevels" gpointer : Read
typedef enum {
BT_WAVE_LOOP_MODE_OFF=0,
BT_WAVE_LOOP_MODE_FORWARD,
BT_WAVE_LOOP_MODE_PINGPONG
} BtWaveLoopMode;
BtWave clips can be played using several loop modes.
BtWave * bt_wave_new (const BtSong * const song, const gchar * const name, const gchar * const uri, const gulong index, const gdouble volume, const BtWaveLoopMode loop_mode, const guint channels);
Create a new instance
|
the song the new instance belongs to |
|
the display name for the new wave |
|
the location of the sample data |
|
the list slot for the new wave |
|
the volume of the wave |
|
loop playback mode |
|
number of audio channels |
Returns : |
the new instance or NULL in case of an error
|
gboolean bt_wave_add_wavelevel (const BtWave * const self, const BtWavelevel * const wavelevel);
Add the supplied wavelevel to the wave. This is automatically done by
#bt_wavelevel_new().
|
the wavetable to add the new wavelevel to |
|
the new wavelevel instance |
Returns : |
TRUE for success, FALSE otheriwse
|
BtWavelevel * bt_wave_get_level_by_index (const BtWave * const self, const gulong index);
Search the wave for a wavelevel by the supplied index.
The wavelevel must have been added previously to this wave with bt_wave_add_wavelevel().
Unref the wavelevel, when done with it.
|
the wave to search for the wavelevel |
|
the index of the wavelevel |
Returns : |
BtWaveLevel instance or NULL if not found
|
"channels" property"channels" guint : Read / Write / Construct
number of channels in the sample.
Allowed values: <= 2
Default value: 0
"index" property"index" gulong : Read / Write / Construct
The index of the wave in the wavtable.
"loop-mode" property"loop-mode" BtWaveLoopMode : Read / Write / Construct
mode of loop playback.
Default value: off
"name" property"name" gchar* : Read / Write / Construct
The name of the wave.
Default value: "unamed wave"
"song" property"song" BtSong* : Read / Write / Construct Only
Set song object, the wave belongs to.
"volume" property"volume" gdouble : Read / Write / Construct
The volume of the wave in the wavtable.
Allowed values: [0,1]
Default value: 1
"loading-done" signalvoid user_function (BtWave *self, gboolean success, gpointer user_data) : Run Last / No Recursion / No Hooks
Loading the sample has finished with result.
|
the setup object that emitted the signal |
|
the result |
|
user data set when the signal handler was connected. |