Public Attributes | List of all members
draudio_sound_desc Struct Reference

The structure that is used for creating a sound object. More...

#include <dr_audio_ancient.h>

Public Attributes

unsigned int bitsPerSample
 The number of bits per sample. More...
 
unsigned int channels
 The number of channels. This should be 1 for mono, 2 for stereo. More...
 
unsigned int extraDataSize
 
unsigned int flags
 
draudio_format format
 The data format. More...
 
draudio_on_sound_delete_proc onDelete
 
draudio_on_sound_read_data_proc onRead
 
draudio_on_sound_seek_data_proc onSeek
 
void * pData
 
const void * pExtraData
 
unsigned int sampleRate
 The sample rate. More...
 
size_t sizeInBytes
 

Detailed Description

The structure that is used for creating a sound object.

Definition at line 566 of file porcupine/demo/c/dr_libs/old/dr_audio_ancient.h.

Member Data Documentation

◆ bitsPerSample

unsigned int draudio_sound_desc::bitsPerSample

The number of bits per sample.

Definition at line 582 of file porcupine/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ channels

unsigned int draudio_sound_desc::channels

The number of channels. This should be 1 for mono, 2 for stereo.

Definition at line 576 of file porcupine/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ extraDataSize

unsigned int draudio_sound_desc::extraDataSize

The size of the extra data to associate with the sound. Extra data is how an application can link custom data to the sound object.

Definition at line 608 of file porcupine/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ flags

unsigned int draudio_sound_desc::flags

Boolean flags. DRAUDIO_ENABLE_3D: Enable 3D positioning

Definition at line 570 of file porcupine/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ format

draudio_format draudio_sound_desc::format

The data format.

Definition at line 573 of file porcupine/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ onDelete

draudio_on_sound_delete_proc draudio_sound_desc::onDelete

A pointer to the function to call when the sound is being deleted. This gives the application the opportunity to delete internal objects that are used for streaming or whatnot.

Definition at line 595 of file porcupine/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ onRead

draudio_on_sound_read_data_proc draudio_sound_desc::onRead

A pointer to the function to call when dr_audio needs to request a chunk of audio data. This is only used when streaming data.

Definition at line 599 of file porcupine/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ onSeek

draudio_on_sound_seek_data_proc draudio_sound_desc::onSeek

A pointer to the function to call when dr_audio needs to seek the audio data. This is only used when streaming data.

Definition at line 603 of file porcupine/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ pData

void * draudio_sound_desc::pData

A pointer to the initial data. Can be null, in which case the audio data is streamed with the onRead and onSeek callbacks below. It is an error for this to be null in addition to onRead and onSeek.

Definition at line 590 of file porcupine/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ pExtraData

const void * draudio_sound_desc::pExtraData

A pointer to a buffer containing the initial extra data. This buffer is copied when the sound is initially created, and can be null.

Definition at line 612 of file porcupine/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ sampleRate

unsigned int draudio_sound_desc::sampleRate

The sample rate.

Definition at line 579 of file porcupine/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ sizeInBytes

size_t draudio_sound_desc::sizeInBytes

The size in bytes of the data. When this is non-zero, and pInitialData is non-null, the onRead and onSeek streaming callbacks are not used, and instead the sound's audio data is made up exclusively with this data.

Definition at line 586 of file porcupine/demo/c/dr_libs/old/dr_audio_ancient.h.


The documentation for this struct was generated from the following file:


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:19