libgpac
Documentation of the core library of GPAC
wav_out.c File Reference
#include <gpac/modules/audio_out.h>
#include <windows.h>
#include <gpac/constants.h>
+ Include dependency graph for wav_out.c:

Data Structures

struct  WAVContext
 
struct  WAVEFORMATEXTENSIBLE
 
union  WAVEFORMATEXTENSIBLE.Samples
 

Macros

#define MAX_AUDIO_BUFFER   30
 
#define USE_WAVE_EXT
 
#define WAVE_FORMAT_EXTENSIBLE   0xFFFE
 
#define SPEAKER_FRONT_LEFT   0x1
 
#define SPEAKER_FRONT_RIGHT   0x2
 
#define SPEAKER_FRONT_CENTER   0x4
 
#define SPEAKER_LOW_FREQUENCY   0x8
 
#define SPEAKER_BACK_LEFT   0x10
 
#define SPEAKER_BACK_RIGHT   0x20
 
#define SPEAKER_FRONT_LEFT_OF_CENTER   0x40
 
#define SPEAKER_FRONT_RIGHT_OF_CENTER   0x80
 
#define SPEAKER_BACK_CENTER   0x100
 
#define SPEAKER_SIDE_LEFT   0x200
 
#define SPEAKER_SIDE_RIGHT   0x400
 
#define SPEAKER_TOP_CENTER   0x800
 
#define SPEAKER_TOP_FRONT_LEFT   0x1000
 
#define SPEAKER_TOP_FRONT_CENTER   0x2000
 
#define SPEAKER_TOP_FRONT_RIGHT   0x4000
 
#define SPEAKER_TOP_BACK_LEFT   0x8000
 
#define SPEAKER_TOP_BACK_CENTER   0x10000
 
#define SPEAKER_TOP_BACK_RIGHT   0x20000
 
#define SPEAKER_RESERVED   0x80000000
 
#define WAVCTX()   WAVContext *ctx = (WAVContext *)dr->opaque;
 

Typedefs

typedef struct WAVEFORMATEXTENSIBLEPWAVEFORMATEXTENSIBLE
 

Functions

static GF_Err WAV_Setup (GF_AudioOutput *dr, void *os_handle, u32 num_buffers, u32 total_duration)
 
static void CALLBACK WaveProc (HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
 
static void close_waveform (GF_AudioOutput *dr)
 
static void WAV_Shutdown (GF_AudioOutput *dr)
 
static GF_Err WAV_Configure (GF_AudioOutput *dr, u32 *SampleRate, u32 *NbChannels, u32 *audioFormat, u64 channel_cfg)
 
static void WAV_WriteAudio (GF_AudioOutput *dr)
 
static void WAV_Play (GF_AudioOutput *dr, u32 PlayType)
 
static void set_vol_pan (WAVContext *ctx)
 
static void WAV_SetVolume (GF_AudioOutput *dr, u32 Volume)
 
static void WAV_SetPan (GF_AudioOutput *dr, u32 Pan)
 
static GF_Err WAV_QueryOutputSampleRate (GF_AudioOutput *dr, u32 *desired_samplerate, u32 *NbChannels, u32 *nbBitsPerSample)
 
static u32 WAV_GetAudioDelay (GF_AudioOutput *dr)
 
static u32 WAV_GetTotalBufferTime (GF_AudioOutput *dr)
 
void * NewWAVRender ()
 
void DeleteWAVRender (void *ifce)
 
GPAC_MODULE_EXPORT const u32QueryInterfaces ()
 
GPAC_MODULE_EXPORT GF_BaseInterfaceLoadInterface (u32 InterfaceType)
 
GPAC_MODULE_EXPORT void ShutdownInterface (GF_BaseInterface *ifce)
 

Variables

static const GUID GPAC_KSDATAFORMAT_SUBTYPE_PCM = {0x00000001,0x0000,0x0010, {0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71} }
 

Data Structure Documentation

◆ WAVContext

struct WAVContext
Data Fields
HWAVEOUT hwo
WAVEHDR wav_hdr[MAX_AUDIO_BUFFER]
WAVEFORMATEX fmt
u32 num_buffers
u32 buffer_size
Bool exit_request
HANDLE event
u32 vol
u32 pan
u32 delay
u32 total_length_ms
Bool force_config
u32 cfg_num_buffers
u32 cfg_duration
char * wav_buf

◆ WAVEFORMATEXTENSIBLE

struct WAVEFORMATEXTENSIBLE
Data Fields
WAVEFORMATEX Format
union WAVEFORMATEXTENSIBLE Samples
DWORD dwChannelMask
GUID SubFormat

◆ WAVEFORMATEXTENSIBLE.Samples

union WAVEFORMATEXTENSIBLE.Samples
Data Fields
WORD wValidBitsPerSample
WORD wSamplesPerBlock
WORD wReserved

Macro Definition Documentation

◆ MAX_AUDIO_BUFFER

#define MAX_AUDIO_BUFFER   30

◆ USE_WAVE_EXT

#define USE_WAVE_EXT

◆ WAVE_FORMAT_EXTENSIBLE

#define WAVE_FORMAT_EXTENSIBLE   0xFFFE

◆ SPEAKER_FRONT_LEFT

#define SPEAKER_FRONT_LEFT   0x1

◆ SPEAKER_FRONT_RIGHT

#define SPEAKER_FRONT_RIGHT   0x2

◆ SPEAKER_FRONT_CENTER

#define SPEAKER_FRONT_CENTER   0x4

◆ SPEAKER_LOW_FREQUENCY

#define SPEAKER_LOW_FREQUENCY   0x8

◆ SPEAKER_BACK_LEFT

#define SPEAKER_BACK_LEFT   0x10

◆ SPEAKER_BACK_RIGHT

#define SPEAKER_BACK_RIGHT   0x20

◆ SPEAKER_FRONT_LEFT_OF_CENTER

#define SPEAKER_FRONT_LEFT_OF_CENTER   0x40

◆ SPEAKER_FRONT_RIGHT_OF_CENTER

#define SPEAKER_FRONT_RIGHT_OF_CENTER   0x80

◆ SPEAKER_BACK_CENTER

#define SPEAKER_BACK_CENTER   0x100

◆ SPEAKER_SIDE_LEFT

#define SPEAKER_SIDE_LEFT   0x200

◆ SPEAKER_SIDE_RIGHT

#define SPEAKER_SIDE_RIGHT   0x400

◆ SPEAKER_TOP_CENTER

#define SPEAKER_TOP_CENTER   0x800

◆ SPEAKER_TOP_FRONT_LEFT

#define SPEAKER_TOP_FRONT_LEFT   0x1000

◆ SPEAKER_TOP_FRONT_CENTER

#define SPEAKER_TOP_FRONT_CENTER   0x2000

◆ SPEAKER_TOP_FRONT_RIGHT

#define SPEAKER_TOP_FRONT_RIGHT   0x4000

◆ SPEAKER_TOP_BACK_LEFT

#define SPEAKER_TOP_BACK_LEFT   0x8000

◆ SPEAKER_TOP_BACK_CENTER

#define SPEAKER_TOP_BACK_CENTER   0x10000

◆ SPEAKER_TOP_BACK_RIGHT

#define SPEAKER_TOP_BACK_RIGHT   0x20000

◆ SPEAKER_RESERVED

#define SPEAKER_RESERVED   0x80000000

◆ WAVCTX

#define WAVCTX ( )    WAVContext *ctx = (WAVContext *)dr->opaque;

Typedef Documentation

◆ PWAVEFORMATEXTENSIBLE

Function Documentation

◆ WAV_Setup()

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

◆ WaveProc()

static void CALLBACK WaveProc ( HWAVEOUT  hwo,
UINT  uMsg,
DWORD_PTR  dwInstance,
DWORD_PTR  dwParam1,
DWORD_PTR  dwParam2 
)
static
+ Here is the caller graph for this function:

◆ close_waveform()

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

◆ WAV_Shutdown()

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

◆ WAV_Configure()

static GF_Err WAV_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:

◆ WAV_WriteAudio()

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

◆ WAV_Play()

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

◆ set_vol_pan()

static void set_vol_pan ( WAVContext ctx)
static
+ Here is the caller graph for this function:

◆ WAV_SetVolume()

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

◆ WAV_SetPan()

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

◆ WAV_QueryOutputSampleRate()

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

◆ WAV_GetAudioDelay()

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

◆ WAV_GetTotalBufferTime()

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

◆ NewWAVRender()

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

◆ DeleteWAVRender()

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

◆ QueryInterfaces()

GPAC_MODULE_EXPORT const u32* QueryInterfaces ( )

◆ LoadInterface()

GPAC_MODULE_EXPORT GF_BaseInterface* LoadInterface ( u32  InterfaceType)
+ Here is the call graph for this function:

◆ ShutdownInterface()

GPAC_MODULE_EXPORT void ShutdownInterface ( GF_BaseInterface ifce)
+ Here is the call graph for this function:

Variable Documentation

◆ GPAC_KSDATAFORMAT_SUBTYPE_PCM

const GUID GPAC_KSDATAFORMAT_SUBTYPE_PCM = {0x00000001,0x0000,0x0010, {0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71} }
static