libgpac
Documentation of the core library of GPAC
dx_audio.c File Reference
#include "dx_hw.h"
+ Include dependency graph for dx_audio.c:

Data Structures

struct  DSContext
 

Macros

#define MAX_NUM_BUFFERS   20
 
#define DSCONTEXT()   DSContext *ctx = (DSContext *)dr->opaque;
 

Typedefs

typedef HRESULT(WINAPI * DIRECTSOUNDCREATEPROC) (LPCGUID pcGuidDevice, LPDIRECTSOUND *ppDS, LPUNKNOWN pUnkOuter)
 

Functions

void DS_WriteAudio (GF_AudioOutput *dr)
 
void DS_WriteAudio_Notifs (GF_AudioOutput *dr)
 
static GF_Err DS_Setup (GF_AudioOutput *dr, void *os_handle, u32 num_buffers, u32 total_duration)
 
void DS_ResetBuffer (DSContext *ctx)
 
void DS_ReleaseBuffer (GF_AudioOutput *dr)
 
static void DS_Shutdown (GF_AudioOutput *dr)
 
static GF_Err DS_Configure (GF_AudioOutput *dr, u32 *SampleRate, u32 *NbChannels, u32 *audioFormat, u64 channel_cfg)
 
static Bool DS_RestoreBuffer (LPDIRECTSOUNDBUFFER pDSBuffer)
 
void DS_FillBuffer (GF_AudioOutput *dr, u32 buffer)
 
static GF_Err DS_QueryOutputSampleRate (GF_AudioOutput *dr, u32 *desired_samplerate, u32 *NbChannels, u32 *nbBitsPerSample)
 
static void DS_Play (GF_AudioOutput *dr, u32 PlayType)
 
static void DS_SetVolume (GF_AudioOutput *dr, u32 Volume)
 
static void DS_SetPan (GF_AudioOutput *dr, u32 Pan)
 
static void DS_SetPriority (GF_AudioOutput *dr, u32 Priority)
 
static u32 DS_GetAudioDelay (GF_AudioOutput *dr)
 
static u32 DS_GetTotalBufferTime (GF_AudioOutput *dr)
 
void * NewAudioOutput ()
 
void DeleteDxAudioOutput (void *ifce)
 

Variables

static GF_GPACArg DSAudioArgs []
 

Data Structure Documentation

◆ DSContext

struct DSContext
Data Fields
Bool force_config
u32 cfg_num_buffers
u32 cfg_duration
HWND hWnd
LPDIRECTSOUND pDS
WAVEFORMATEX format
IDirectSoundBuffer * pOutput
u32 buffer_size
u32 num_audio_buffer
u32 total_audio_buffer_ms
Bool use_notif
u32 frame_state[MAX_NUM_BUFFERS]
DSBPOSITIONNOTIFY notif_events[MAX_NUM_BUFFERS]
HANDLE events[MAX_NUM_BUFFERS]
HMODULE hDSoundLib
DIRECTSOUNDCREATEPROC DirectSoundCreate

Macro Definition Documentation

◆ MAX_NUM_BUFFERS

#define MAX_NUM_BUFFERS   20

◆ DSCONTEXT

#define DSCONTEXT ( )    DSContext *ctx = (DSContext *)dr->opaque;

Typedef Documentation

◆ DIRECTSOUNDCREATEPROC

typedef HRESULT(WINAPI * DIRECTSOUNDCREATEPROC) (LPCGUID pcGuidDevice, LPDIRECTSOUND *ppDS, LPUNKNOWN pUnkOuter)

Function Documentation

◆ DS_WriteAudio()

void DS_WriteAudio ( GF_AudioOutput dr)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DS_WriteAudio_Notifs()

void DS_WriteAudio_Notifs ( GF_AudioOutput dr)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DS_Setup()

static GF_Err DS_Setup ( GF_AudioOutput dr,
void *  os_handle,
u32  num_buffers,
u32  total_duration 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DS_ResetBuffer()

void DS_ResetBuffer ( DSContext ctx)
+ Here is the caller graph for this function:

◆ DS_ReleaseBuffer()

void DS_ReleaseBuffer ( GF_AudioOutput dr)
+ Here is the caller graph for this function:

◆ DS_Shutdown()

static void DS_Shutdown ( GF_AudioOutput dr)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DS_Configure()

static GF_Err DS_Configure ( GF_AudioOutput dr,
u32 SampleRate,
u32 NbChannels,
u32 audioFormat,
u64  channel_cfg 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DS_RestoreBuffer()

static Bool DS_RestoreBuffer ( LPDIRECTSOUNDBUFFER  pDSBuffer)
static
+ Here is the caller graph for this function:

◆ DS_FillBuffer()

void DS_FillBuffer ( GF_AudioOutput dr,
u32  buffer 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DS_QueryOutputSampleRate()

static GF_Err DS_QueryOutputSampleRate ( GF_AudioOutput dr,
u32 desired_samplerate,
u32 NbChannels,
u32 nbBitsPerSample 
)
static
+ Here is the caller graph for this function:

◆ DS_Play()

static void DS_Play ( GF_AudioOutput dr,
u32  PlayType 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DS_SetVolume()

static void DS_SetVolume ( GF_AudioOutput dr,
u32  Volume 
)
static
+ Here is the caller graph for this function:

◆ DS_SetPan()

static void DS_SetPan ( GF_AudioOutput dr,
u32  Pan 
)
static
+ Here is the caller graph for this function:

◆ DS_SetPriority()

static void DS_SetPriority ( GF_AudioOutput dr,
u32  Priority 
)
static
+ Here is the caller graph for this function:

◆ DS_GetAudioDelay()

static u32 DS_GetAudioDelay ( GF_AudioOutput dr)
static
+ Here is the caller graph for this function:

◆ DS_GetTotalBufferTime()

static u32 DS_GetTotalBufferTime ( GF_AudioOutput dr)
static
+ Here is the caller graph for this function:

◆ NewAudioOutput()

void* NewAudioOutput ( )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeleteDxAudioOutput()

void DeleteDxAudioOutput ( void *  ifce)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ DSAudioArgs

GF_GPACArg DSAudioArgs[]
static
Initial value:
= {
GF_DEF_ARG("disable-notif", NULL, "disable buffer position notifications", "false", NULL, GF_ARG_BOOL, 0),
{0},
}
#define GF_DEF_ARG(_a, _b, _c, _d, _e, _f, _g)
Definition: main.h:166
#define GF_ARG_BOOL
Definition: main.h:149