Classes | Macros | Typedefs | Enumerations | Functions
rhino/demo/c/dr_libs/old/dr_audio_ancient.h File Reference
#include <stdbool.h>
#include <stdint.h>
Include dependency graph for rhino/demo/c/dr_libs/old/dr_audio_ancient.h:

Go to the source code of this file.

Classes

struct  draudio_buffer_desc
 
struct  draudio_device_info
 
struct  draudio_effect
 
struct  draudio_event_callback
 
struct  draudio_sound
 
struct  draudio_sound_desc
 The structure that is used for creating a sound object. More...
 
struct  draudio_streaming_callbacks
 
struct  draudio_world
 

Macros

#define DRAUDIO_ENABLE_3D   (1 << 0)
 
#define DRAUDIO_EVENT_ID_MARKER   0
 
#define DRAUDIO_EVENT_ID_PAUSE   0xFFFFFFFE
 
#define DRAUDIO_EVENT_ID_PLAY   0xFFFFFFFD
 
#define DRAUDIO_EVENT_ID_STOP   0xFFFFFFFF
 
#define DRAUDIO_MAX_DEVICE_COUNT   16
 
#define DRAUDIO_MAX_MARKER_COUNT   4
 
#define DRAUDIO_MAX_MESSAGE_QUEUE_SIZE   1024
 
#define DRAUDIO_RELATIVE_3D   (1 << 1)
 

Typedefs

typedef int draudio_bool
 
typedef struct draudio_buffer draudio_buffer
 
typedef struct draudio_context draudio_context
 
typedef struct draudio_device draudio_device
 
typedef void(* draudio_event_callback_proc) (draudio_buffer *pBuffer, unsigned int eventID, void *pUserData)
 
typedef void * draudio_mutex
 
typedef void(* draudio_on_sound_delete_proc) (draudio_sound *pSound)
 
typedef bool(* draudio_on_sound_read_data_proc) (draudio_sound *pSound, void *pDataOut, size_t bytesToRead, size_t *bytesReadOut)
 
typedef bool(* draudio_on_sound_seek_data_proc) (draudio_sound *pSound, size_t offsetInBytesFromStart)
 
typedef struct draudio_sound draudio_sound
 
typedef draudio_bool(* draudio_stream_read_proc) (void *pUserData, void *pDataOut, size_t bytesToRead, size_t *bytesReadOut)
 
typedef draudio_bool(* draudio_stream_seek_proc) (void *pUserData, size_t offsetInBytesFromStart)
 
typedef struct draudio_world draudio_world
 

Enumerations

enum  draudio_3d_mode {
  draudio_3d_mode_absolute, draudio_3d_mode_relative, draudio_3d_mode_disabled, draudio_3d_mode_absolute,
  draudio_3d_mode_relative, draudio_3d_mode_disabled
}
 
enum  draudio_effect_type {
  draudio_effect_type_none, draudio_effect_type_i3dl2reverb, draudio_effect_type_chorus, draudio_effect_type_compressor,
  draudio_effect_type_distortion, draudio_effect_type_echo, draudio_effect_type_flanger, draudio_effect_type_none,
  draudio_effect_type_i3dl2reverb, draudio_effect_type_chorus, draudio_effect_type_compressor, draudio_effect_type_distortion,
  draudio_effect_type_echo, draudio_effect_type_flanger
}
 
enum  draudio_format { draudio_format_pcm, draudio_format_float, draudio_format_pcm, draudio_format_float }
 
enum  draudio_playback_state {
  draudio_stopped, draudio_paused, draudio_playing, draudio_stopped,
  draudio_paused, draudio_playing
}
 

Functions

draudio_bufferdraudio_create_buffer (draudio_device *pDevice, draudio_buffer_desc *pBufferDesc, size_t extraDataSize)
 
draudio_contextdraudio_create_context ()
 Creates a context which chooses an appropriate backend based on the given platform. More...
 
draudio_mutex draudio_create_mutex ()
 Creates a mutex object. More...
 
draudio_devicedraudio_create_output_device (draudio_context *pContext, unsigned int deviceIndex)
 
draudio_sounddraudio_create_sound (draudio_world *pWorld, draudio_sound_desc desc)
 Creates a sound in 3D space. More...
 
draudio_bufferdraudio_create_streaming_buffer (draudio_device *pDevice, draudio_buffer_desc *pBufferDesc, draudio_streaming_callbacks callbacks, unsigned int extraDataSize)
 
draudio_worlddraudio_create_world (draudio_device *pDevice)
 Creates a new sound world which will output audio from the given device. More...
 
void draudio_delete_all_sounds (draudio_world *pWorld)
 Deletes every sound from the given world. More...
 
void draudio_delete_buffer (draudio_buffer *pBuffer)
 Deletes the given buffer. More...
 
void draudio_delete_context (draudio_context *pContext)
 Deletes the given context. More...
 
void draudio_delete_mutex (draudio_mutex mutex)
 Deletes a mutex object. More...
 
void draudio_delete_output_device (draudio_device *pDevice)
 Deletes the given output device. More...
 
void draudio_delete_sound (draudio_sound *pSound)
 Deletes a sound that was previously created with draudio_create_sound(). More...
 
void draudio_delete_world (draudio_world *pWorld)
 Deletes a sound world that was previously created with draudio_create_world(). More...
 
draudio_3d_mode draudio_get_3d_mode (draudio_buffer *pBuffer)
 Retrieves the 3D processing mode (absolute, relative or disabled). More...
 
void * draudio_get_buffer_extra_data (draudio_buffer *pBuffer)
 Retrieves a pointer to the given buffer's extra data. More...
 
unsigned int draudio_get_buffer_extra_data_size (draudio_buffer *pBuffer)
 Retrieves the size in bytes of the given buffer's extra data. More...
 
void draudio_get_listener_orientation (draudio_device *pDevice, float *pForwardOut, float *pUpOut)
 Retrieves the orientation of the listener for the given output device. More...
 
void draudio_get_listener_position (draudio_device *pDevice, float *pPosOut)
 Retrieves the position of the listner for the given output device. More...
 
unsigned int draudio_get_output_device_count (draudio_context *pContext)
 Retrieves the number of output devices that were enumerated when the context was created. More...
 
bool draudio_get_output_device_info (draudio_context *pContext, unsigned int deviceIndex, draudio_device_info *pInfoOut)
 Retrieves information about the device at the given index. More...
 
float draudio_get_pan (draudio_buffer *pBuffer)
 Retrieves the pan of the given buffer. More...
 
draudio_event_callback draudio_get_pause_callback (draudio_buffer *pBuffer)
 Retrieves the callback that is currently set for the pause event. More...
 
draudio_event_callback draudio_get_play_callback (draudio_buffer *pBuffer)
 Retrieves the callback that is currently set for the play event. More...
 
unsigned int draudio_get_playback_position (draudio_buffer *pBuffer)
 Retrieves hte playback position of the given buffer. More...
 
draudio_playback_state draudio_get_playback_state (draudio_buffer *pBuffer)
 Retrieves the playback state of the given buffer. More...
 
void draudio_get_position (draudio_buffer *pBuffer, float *pPosOut)
 Retrieves the position of the given buffer in 3D space. More...
 
draudio_3d_mode draudio_get_sound_3d_mode (draudio_sound *pSound)
 Retrieves the 3D mode of the given sound. More...
 
void * draudio_get_sound_extra_data (draudio_sound *pSound)
 Retrieves a pointer to the buffer containing the given sound's extra data. More...
 
size_t draudio_get_sound_extra_data_size (draudio_sound *pSound)
 Retrieves the size in bytes of the given sound's extra data. More...
 
draudio_playback_state draudio_get_sound_playback_state (draudio_sound *pSound)
 Retrieves the playback state of the given sound. More...
 
draudio_event_callback draudio_get_stop_callback (draudio_buffer *pBuffer)
 Retrieves the callback that is currently set for the stop event. More...
 
void * draudio_get_streaming_buffer_extra_data (draudio_buffer *pBuffer)
 Retrieves a pointer to the extra data of the given streaming buffer. More...
 
size_t draudio_get_streaming_buffer_extra_data_size (draudio_buffer *pBuffer)
 Retrieves the size of the extra data of the given streaming buffer.. More...
 
float draudio_get_volume (draudio_buffer *pBuffer)
 Retrieves the volume of the sound. More...
 
bool draudio_is_looping (draudio_buffer *pBuffer)
 Determines whether or not the given audio buffer is looping. More...
 
bool draudio_is_sound_looping (draudio_sound *pSound)
 Determines if the given sound is looping. More...
 
bool draudio_is_streaming_buffer_looping (draudio_buffer *pBuffer)
 Determines whether or not the given streaming buffer is looping. More...
 
void draudio_lock_mutex (draudio_mutex mutex)
 Locks the given mutex. More...
 
void draudio_pause (draudio_buffer *pBuffer)
 Pauses playback of the given buffer. More...
 
void draudio_pause_all_sounds (draudio_world *pWorld)
 Pauses playback of all sounds in the given world. More...
 
void draudio_pause_sound (draudio_sound *pSound)
 Pauses playback the given sound. More...
 
void draudio_play (draudio_buffer *pBuffer, bool loop)
 
void draudio_play_inline_sound (draudio_world *pWorld, draudio_sound_desc desc)
 Begins playing a sound using the given streaming callbacks. More...
 
void draudio_play_inline_sound_3f (draudio_world *pWorld, draudio_sound_desc desc, float posX, float posY, float posZ)
 Begins playing the given sound at the given position. More...
 
void draudio_play_sound (draudio_sound *pSound, bool loop)
 Plays or resumes the given sound. More...
 
bool draudio_play_streaming_buffer (draudio_buffer *pBuffer, bool loop)
 Begins playing the given streaming buffer. More...
 
bool draudio_register_marker_callback (draudio_buffer *pBuffer, size_t offsetInBytes, draudio_event_callback_proc callback, unsigned int eventID, void *pUserData)
 
bool draudio_register_pause_callback (draudio_buffer *pBuffer, draudio_event_callback_proc callback, void *pUserData)
 
bool draudio_register_play_callback (draudio_buffer *pBuffer, draudio_event_callback_proc callback, void *pUserData)
 
bool draudio_register_stop_callback (draudio_buffer *pBuffer, draudio_event_callback_proc callback, void *pUserData)
 
void draudio_remove_markers (draudio_buffer *pBuffer)
 Removes every marker. More...
 
void draudio_resume_all_sounds (draudio_world *pWorld)
 Resumes playback of all sounds in the given world. More...
 
void draudio_set_3d_mode (draudio_buffer *pBuffer, draudio_3d_mode mode)
 
void draudio_set_buffer_data (draudio_buffer *pBuffer, size_t offset, const void *pData, size_t dataSizeInBytes)
 Sets the audio data of the given buffer. More...
 
void draudio_set_listener_orientation (draudio_device *pDevice, float forwardX, float forwardY, float forwardZ, float upX, float upY, float upZ)
 Sets the orientation of the listener for the given output device. More...
 
void draudio_set_listener_position (draudio_device *pDevice, float x, float y, float z)
 Sets the position of the listener for the given output device. More...
 
void draudio_set_pan (draudio_buffer *pBuffer, float pan)
 
void draudio_set_playback_position (draudio_buffer *pBuffer, unsigned int position)
 Sets the playback position for the given buffer. More...
 
void draudio_set_position (draudio_buffer *pBuffer, float x, float y, float z)
 
void draudio_set_sound_3d_mode (draudio_sound *pSound, draudio_3d_mode mode)
 Sets the 3D mode of the given sound (absolute positioning, relative positioning, no positioning). More...
 
void draudio_set_sound_pause_callback (draudio_sound *pSound, draudio_event_callback_proc callback, void *pUserData)
 Sets the callback for the pause event for the given sound. More...
 
void draudio_set_sound_play_callback (draudio_sound *pSound, draudio_event_callback_proc callback, void *pUserData)
 Sets the callback for the play event for the given sound. More...
 
void draudio_set_sound_position (draudio_sound *pSound, float posX, float posY, float posZ)
 Sets the position of the given sound. More...
 
void draudio_set_sound_stop_callback (draudio_sound *pSound, draudio_event_callback_proc callback, void *pUserData)
 Sets the callback for the stop event for the given sound. More...
 
void draudio_set_volume (draudio_buffer *pBuffer, float volume)
 
void draudio_stop (draudio_buffer *pBuffer)
 Stops playback of the given buffer. More...
 
void draudio_stop_all_sounds (draudio_world *pWorld)
 Stops playback of all sounds in the given world. More...
 
void draudio_stop_sound (draudio_sound *pSound)
 Stops playback of the given sound. More...
 
void draudio_unlock_mutex (draudio_mutex mutex)
 Unlocks the given mutex. More...
 

Macro Definition Documentation

◆ DRAUDIO_ENABLE_3D

#define DRAUDIO_ENABLE_3D   (1 << 0)

Definition at line 92 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ DRAUDIO_EVENT_ID_MARKER

#define DRAUDIO_EVENT_ID_MARKER   0

Definition at line 90 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ DRAUDIO_EVENT_ID_PAUSE

#define DRAUDIO_EVENT_ID_PAUSE   0xFFFFFFFE

Definition at line 88 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ DRAUDIO_EVENT_ID_PLAY

#define DRAUDIO_EVENT_ID_PLAY   0xFFFFFFFD

Definition at line 89 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ DRAUDIO_EVENT_ID_STOP

#define DRAUDIO_EVENT_ID_STOP   0xFFFFFFFF

Definition at line 87 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ DRAUDIO_MAX_DEVICE_COUNT

#define DRAUDIO_MAX_DEVICE_COUNT   16

Definition at line 77 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ DRAUDIO_MAX_MARKER_COUNT

#define DRAUDIO_MAX_MARKER_COUNT   4

Definition at line 78 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ DRAUDIO_MAX_MESSAGE_QUEUE_SIZE

#define DRAUDIO_MAX_MESSAGE_QUEUE_SIZE   1024

Definition at line 79 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ DRAUDIO_RELATIVE_3D

#define DRAUDIO_RELATIVE_3D   (1 << 1)

Definition at line 93 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

Typedef Documentation

◆ draudio_bool

typedef int draudio_bool

Definition at line 494 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ draudio_buffer

Definition at line 138 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ draudio_context

Definition at line 136 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ draudio_device

Definition at line 137 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ draudio_event_callback_proc

typedef void(* draudio_event_callback_proc) (draudio_buffer *pBuffer, unsigned int eventID, void *pUserData)

Definition at line 140 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ draudio_mutex

typedef void* draudio_mutex

Definition at line 476 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ draudio_on_sound_delete_proc

typedef void(* draudio_on_sound_delete_proc) (draudio_sound *pSound)

Definition at line 561 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ draudio_on_sound_read_data_proc

typedef bool(* draudio_on_sound_read_data_proc) (draudio_sound *pSound, void *pDataOut, size_t bytesToRead, size_t *bytesReadOut)

Definition at line 562 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ draudio_on_sound_seek_data_proc

typedef bool(* draudio_on_sound_seek_data_proc) (draudio_sound *pSound, size_t offsetInBytesFromStart)

Definition at line 563 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ draudio_sound

typedef struct draudio_sound draudio_sound

Definition at line 558 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ draudio_stream_read_proc

typedef draudio_bool(* draudio_stream_read_proc) (void *pUserData, void *pDataOut, size_t bytesToRead, size_t *bytesReadOut)

Definition at line 496 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ draudio_stream_seek_proc

typedef draudio_bool(* draudio_stream_seek_proc) (void *pUserData, size_t offsetInBytesFromStart)

Definition at line 497 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ draudio_world

typedef struct draudio_world draudio_world

Definition at line 559 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

Enumeration Type Documentation

◆ draudio_3d_mode

Enumerator
draudio_3d_mode_absolute 
draudio_3d_mode_relative 
draudio_3d_mode_disabled 
draudio_3d_mode_absolute 
draudio_3d_mode_relative 
draudio_3d_mode_disabled 

Definition at line 127 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ draudio_effect_type

Enumerator
draudio_effect_type_none 
draudio_effect_type_i3dl2reverb 
draudio_effect_type_chorus 
draudio_effect_type_compressor 
draudio_effect_type_distortion 
draudio_effect_type_echo 
draudio_effect_type_flanger 
draudio_effect_type_none 
draudio_effect_type_i3dl2reverb 
draudio_effect_type_chorus 
draudio_effect_type_compressor 
draudio_effect_type_distortion 
draudio_effect_type_echo 
draudio_effect_type_flanger 

Definition at line 114 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ draudio_format

Enumerator
draudio_format_pcm 
draudio_format_float 
draudio_format_pcm 
draudio_format_float 

Definition at line 97 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

◆ draudio_playback_state

Enumerator
draudio_stopped 
draudio_paused 
draudio_playing 
draudio_stopped 
draudio_paused 
draudio_playing 

Definition at line 105 of file rhino/demo/c/dr_libs/old/dr_audio_ancient.h.

Function Documentation

◆ draudio_create_buffer()

draudio_buffer* draudio_create_buffer ( draudio_device pDevice,
draudio_buffer_desc pBufferDesc,
size_t  extraDataSize 
)

Create a buffer.

Remarks
This will fail if 3D positioning is requested when the sound has more than 1 channel.

◆ draudio_create_context()

draudio_context* draudio_create_context ( )

Creates a context which chooses an appropriate backend based on the given platform.

◆ draudio_create_mutex()

draudio_mutex draudio_create_mutex ( )

Creates a mutex object.

◆ draudio_create_output_device()

draudio_device* draudio_create_output_device ( draudio_context pContext,
unsigned int  deviceIndex 
)

Creates a output device.

Parameters
pContext[in] A pointer to the main context.
deviceIndex[in] The index of the device.
Remarks
Use a device index of 0 to use the default output device.

◆ draudio_create_sound()

draudio_sound* draudio_create_sound ( draudio_world pWorld,
draudio_sound_desc  desc 
)

Creates a sound in 3D space.

◆ draudio_create_streaming_buffer()

draudio_buffer* draudio_create_streaming_buffer ( draudio_device pDevice,
draudio_buffer_desc pBufferDesc,
draudio_streaming_callbacks  callbacks,
unsigned int  extraDataSize 
)

Creates a buffer that's pre-configured for use for streaming audio data.

Remarks
This function is just a high-level convenience wrapper. The returned buffer is just a regular buffer with pre-configured markers attached to the buffer. This will attach 3 markers in total which means there is only DRAUDIO_MAX_MARKER_COUNT - 3 marker slots available to the application.
You must play the buffer with draudio_play_streaming_buffer() because the underlying buffer management is slightly different to a regular buffer.
Looping and stop callbacks may be inaccurate by up to half a second.
Callback functions use bytes to determine how much data to process. This is always a multiple of samples * channels, however.
The first chunk of data is not loaded until the buffer is played with draudio_play_streaming_buffer().

◆ draudio_create_world()

draudio_world* draudio_create_world ( draudio_device pDevice)

Creates a new sound world which will output audio from the given device.

◆ draudio_delete_all_sounds()

void draudio_delete_all_sounds ( draudio_world pWorld)

Deletes every sound from the given world.

◆ draudio_delete_buffer()

void draudio_delete_buffer ( draudio_buffer pBuffer)

Deletes the given buffer.

◆ draudio_delete_context()

void draudio_delete_context ( draudio_context pContext)

Deletes the given context.

◆ draudio_delete_mutex()

void draudio_delete_mutex ( draudio_mutex  mutex)

Deletes a mutex object.

◆ draudio_delete_output_device()

void draudio_delete_output_device ( draudio_device pDevice)

Deletes the given output device.

◆ draudio_delete_sound()

void draudio_delete_sound ( draudio_sound pSound)

Deletes a sound that was previously created with draudio_create_sound().

◆ draudio_delete_world()

void draudio_delete_world ( draudio_world pWorld)

Deletes a sound world that was previously created with draudio_create_world().

◆ draudio_get_3d_mode()

draudio_3d_mode draudio_get_3d_mode ( draudio_buffer pBuffer)

Retrieves the 3D processing mode (absolute, relative or disabled).

◆ draudio_get_buffer_extra_data()

void* draudio_get_buffer_extra_data ( draudio_buffer pBuffer)

Retrieves a pointer to the given buffer's extra data.

◆ draudio_get_buffer_extra_data_size()

unsigned int draudio_get_buffer_extra_data_size ( draudio_buffer pBuffer)

Retrieves the size in bytes of the given buffer's extra data.

◆ draudio_get_listener_orientation()

void draudio_get_listener_orientation ( draudio_device pDevice,
float *  pForwardOut,
float *  pUpOut 
)

Retrieves the orientation of the listener for the given output device.

◆ draudio_get_listener_position()

void draudio_get_listener_position ( draudio_device pDevice,
float *  pPosOut 
)

Retrieves the position of the listner for the given output device.

◆ draudio_get_output_device_count()

unsigned int draudio_get_output_device_count ( draudio_context pContext)

Retrieves the number of output devices that were enumerated when the context was created.

◆ draudio_get_output_device_info()

bool draudio_get_output_device_info ( draudio_context pContext,
unsigned int  deviceIndex,
draudio_device_info pInfoOut 
)

Retrieves information about the device at the given index.

◆ draudio_get_pan()

float draudio_get_pan ( draudio_buffer pBuffer)

Retrieves the pan of the given buffer.

◆ draudio_get_pause_callback()

draudio_event_callback draudio_get_pause_callback ( draudio_buffer pBuffer)

Retrieves the callback that is currently set for the pause event.

◆ draudio_get_play_callback()

draudio_event_callback draudio_get_play_callback ( draudio_buffer pBuffer)

Retrieves the callback that is currently set for the play event.

◆ draudio_get_playback_position()

unsigned int draudio_get_playback_position ( draudio_buffer pBuffer)

Retrieves hte playback position of the given buffer.

◆ draudio_get_playback_state()

draudio_playback_state draudio_get_playback_state ( draudio_buffer pBuffer)

Retrieves the playback state of the given buffer.

◆ draudio_get_position()

void draudio_get_position ( draudio_buffer pBuffer,
float *  pPosOut 
)

Retrieves the position of the given buffer in 3D space.

◆ draudio_get_sound_3d_mode()

draudio_3d_mode draudio_get_sound_3d_mode ( draudio_sound pSound)

Retrieves the 3D mode of the given sound.

◆ draudio_get_sound_extra_data()

void* draudio_get_sound_extra_data ( draudio_sound pSound)

Retrieves a pointer to the buffer containing the given sound's extra data.

◆ draudio_get_sound_extra_data_size()

size_t draudio_get_sound_extra_data_size ( draudio_sound pSound)

Retrieves the size in bytes of the given sound's extra data.

◆ draudio_get_sound_playback_state()

draudio_playback_state draudio_get_sound_playback_state ( draudio_sound pSound)

Retrieves the playback state of the given sound.

◆ draudio_get_stop_callback()

draudio_event_callback draudio_get_stop_callback ( draudio_buffer pBuffer)

Retrieves the callback that is currently set for the stop event.

◆ draudio_get_streaming_buffer_extra_data()

void* draudio_get_streaming_buffer_extra_data ( draudio_buffer pBuffer)

Retrieves a pointer to the extra data of the given streaming buffer.

◆ draudio_get_streaming_buffer_extra_data_size()

size_t draudio_get_streaming_buffer_extra_data_size ( draudio_buffer pBuffer)

Retrieves the size of the extra data of the given streaming buffer..

◆ draudio_get_volume()

float draudio_get_volume ( draudio_buffer pBuffer)

Retrieves the volume of the sound.

◆ draudio_is_looping()

bool draudio_is_looping ( draudio_buffer pBuffer)

Determines whether or not the given audio buffer is looping.

◆ draudio_is_sound_looping()

bool draudio_is_sound_looping ( draudio_sound pSound)

Determines if the given sound is looping.

◆ draudio_is_streaming_buffer_looping()

bool draudio_is_streaming_buffer_looping ( draudio_buffer pBuffer)

Determines whether or not the given streaming buffer is looping.

◆ draudio_lock_mutex()

void draudio_lock_mutex ( draudio_mutex  mutex)

Locks the given mutex.

◆ draudio_pause()

void draudio_pause ( draudio_buffer pBuffer)

Pauses playback of the given buffer.

◆ draudio_pause_all_sounds()

void draudio_pause_all_sounds ( draudio_world pWorld)

Pauses playback of all sounds in the given world.

◆ draudio_pause_sound()

void draudio_pause_sound ( draudio_sound pSound)

Pauses playback the given sound.

◆ draudio_play()

void draudio_play ( draudio_buffer pBuffer,
bool  loop 
)

Begins or resumes playing the given buffer.

Remarks
If the sound is already playing, it will continue to play, but the loop setting will be replaced with that specified by the most recent call.

◆ draudio_play_inline_sound()

void draudio_play_inline_sound ( draudio_world pWorld,
draudio_sound_desc  desc 
)

Begins playing a sound using the given streaming callbacks.

◆ draudio_play_inline_sound_3f()

void draudio_play_inline_sound_3f ( draudio_world pWorld,
draudio_sound_desc  desc,
float  posX,
float  posY,
float  posZ 
)

Begins playing the given sound at the given position.

◆ draudio_play_sound()

void draudio_play_sound ( draudio_sound pSound,
bool  loop 
)

Plays or resumes the given sound.

◆ draudio_play_streaming_buffer()

bool draudio_play_streaming_buffer ( draudio_buffer pBuffer,
bool  loop 
)

Begins playing the given streaming buffer.

◆ draudio_register_marker_callback()

bool draudio_register_marker_callback ( draudio_buffer pBuffer,
size_t  offsetInBytes,
draudio_event_callback_proc  callback,
unsigned int  eventID,
void *  pUserData 
)

Registers the callback to fire when the playback position hits a certain position in the given buffer.

Parameters
eventID[in] The event ID that will be passed to the callback and can be used to identify a specific marker.
Remarks
This will fail if the buffer is not in a stopped state.
Set the event ID to DRAUDIO_EVENT_ID_MARKER + n, where "n" is your own application-specific identifier.

◆ draudio_register_pause_callback()

bool draudio_register_pause_callback ( draudio_buffer pBuffer,
draudio_event_callback_proc  callback,
void *  pUserData 
)

Registers the callback to fire when the buffer is paused.

Remarks
This will fail if the buffer is not in a stopped state and the callback is non-null. It is fine to call this with a null callback while the buffer is in the middle of playback in which case the callback will be cleared.
The will replace any previous callback.

◆ draudio_register_play_callback()

bool draudio_register_play_callback ( draudio_buffer pBuffer,
draudio_event_callback_proc  callback,
void *  pUserData 
)

Registers the callback to fire when the buffer begins playing from either a stopped or paused state.

Remarks
This will fail if the buffer is not in a stopped state and the callback is non-null. It is fine to call this with a null callback while the buffer is in the middle of playback in which case the callback will be cleared.
The will replace any previous callback.

◆ draudio_register_stop_callback()

bool draudio_register_stop_callback ( draudio_buffer pBuffer,
draudio_event_callback_proc  callback,
void *  pUserData 
)

Registers the callback to fire when the buffer stops playing.

Remarks
This will fail if the buffer is not in a stopped state and the callback is non-null. It is fine to call this with a null callback while the buffer is in the middle of playback in which case the callback will be cleared.
The will replace any previous callback.

◆ draudio_remove_markers()

void draudio_remove_markers ( draudio_buffer pBuffer)

Removes every marker.

◆ draudio_resume_all_sounds()

void draudio_resume_all_sounds ( draudio_world pWorld)

Resumes playback of all sounds in the given world.

◆ draudio_set_3d_mode()

void draudio_set_3d_mode ( draudio_buffer pBuffer,
draudio_3d_mode  mode 
)

Sets the 3D processing mode (absolute, relative or disabled).

Remarks
This applies to position, orientation and velocity.

◆ draudio_set_buffer_data()

void draudio_set_buffer_data ( draudio_buffer pBuffer,
size_t  offset,
const void *  pData,
size_t  dataSizeInBytes 
)

Sets the audio data of the given buffer.

◆ draudio_set_listener_orientation()

void draudio_set_listener_orientation ( draudio_device pDevice,
float  forwardX,
float  forwardY,
float  forwardZ,
float  upX,
float  upY,
float  upZ 
)

Sets the orientation of the listener for the given output device.

◆ draudio_set_listener_position()

void draudio_set_listener_position ( draudio_device pDevice,
float  x,
float  y,
float  z 
)

Sets the position of the listener for the given output device.

◆ draudio_set_pan()

void draudio_set_pan ( draudio_buffer pBuffer,
float  pan 
)

Sets the pan of the given buffer.

Remarks
This does nothing for 3D sounds.

◆ draudio_set_playback_position()

void draudio_set_playback_position ( draudio_buffer pBuffer,
unsigned int  position 
)

Sets the playback position for the given buffer.

◆ draudio_set_position()

void draudio_set_position ( draudio_buffer pBuffer,
float  x,
float  y,
float  z 
)

Sets the position of the given buffer in 3D space.

Remarks
This does nothing for buffers that do not support 3D positioning.

◆ draudio_set_sound_3d_mode()

void draudio_set_sound_3d_mode ( draudio_sound pSound,
draudio_3d_mode  mode 
)

Sets the 3D mode of the given sound (absolute positioning, relative positioning, no positioning).

◆ draudio_set_sound_pause_callback()

void draudio_set_sound_pause_callback ( draudio_sound pSound,
draudio_event_callback_proc  callback,
void *  pUserData 
)

Sets the callback for the pause event for the given sound.

◆ draudio_set_sound_play_callback()

void draudio_set_sound_play_callback ( draudio_sound pSound,
draudio_event_callback_proc  callback,
void *  pUserData 
)

Sets the callback for the play event for the given sound.

◆ draudio_set_sound_position()

void draudio_set_sound_position ( draudio_sound pSound,
float  posX,
float  posY,
float  posZ 
)

Sets the position of the given sound.

◆ draudio_set_sound_stop_callback()

void draudio_set_sound_stop_callback ( draudio_sound pSound,
draudio_event_callback_proc  callback,
void *  pUserData 
)

Sets the callback for the stop event for the given sound.

◆ draudio_set_volume()

void draudio_set_volume ( draudio_buffer pBuffer,
float  volume 
)

Sets the volume of the given buffer.

Parameters
volume[in] The new volume.
Remarks
Amplificiation is not currently supported, so the maximum value is 1. A value of 1 represents the volume of the original data.

◆ draudio_stop()

void draudio_stop ( draudio_buffer pBuffer)

Stops playback of the given buffer.

◆ draudio_stop_all_sounds()

void draudio_stop_all_sounds ( draudio_world pWorld)

Stops playback of all sounds in the given world.

◆ draudio_stop_sound()

void draudio_stop_sound ( draudio_sound pSound)

Stops playback of the given sound.

◆ draudio_unlock_mutex()

void draudio_unlock_mutex ( draudio_mutex  mutex)

Unlocks the given mutex.



picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:57