Name
PnAudioData -- an object containing audio data
Description
PnAudioData objects contain audio data that is used by
actuators that render audio-based effects.
Details
struct PnAudioData
struct PnAudioData {
/* PCM and frequency data are floats in the range of 0 to 1 */
/* PCM Data */
guint pcm_samples; /* read-only */
gfloat *pcm_data[3]; /* read-write */
/* Frequency Data */
guint freq_bands; /* read-only */
gfloat *freq_data[3]; /* read-write */
}; |
pn_audio_data_set_stereo ()
void pn_audio_data_set_stereo (PnAudioData *audio_data,
gboolean stereo); |
Sets whether audio_data will use stereo audio data. If
stereo is FALSE, each channel buffer points to the same memory
location; otherwise they are separate buffers.
pn_audio_data_set_pcm_samples ()
void pn_audio_data_set_pcm_samples (PnAudioData *audio_data,
guint samples); |
Sets the number of samples that audio_data's pcm data
contains.
pn_audio_data_set_freq_bands ()
void pn_audio_data_set_freq_bands (PnAudioData *audio_data,
guint bands); |
Sets the number of bands that audio_data's frequency data
contains.
pn_audio_data_get_volume ()
gfloat pn_audio_data_get_volume (PnAudioData *audio_data); |
Retrieves the volume level (from 0.0 to 1.0) of the audio frame
contained within a PnAudioData object.
pn_audio_data_update ()
Updates the information about the audio data frame in a PnAudioData.
This function should be called after all updates to pcm_data or freq_data.