Wing Commander
Reconstructed Win32 source (1996)
Loading...
Searching...
No Matches
dsp.cpp File Reference

DirectSound device control and shared configuration. More...

#include <limits.h>
#include "ix.h"
#include <dsound.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Macros

#define IX_DSP_FILE   "D:\\rnd\\prj\\ix\\win95\\dsp\\dsp.cpp"

Functions

void *__cdecl * pIxMalloc (unsigned int)
 void (__cdecl *pIxFree)(void *)
int ix_dsp_init (void)
void ix_dsp_shutdown (void)
void ix_dsp_configure (int option, void *value)
BOOL CALLBACK ix_dsp_open_driver (LPGUID guid, LPSTR description, LPSTR module, LPVOID context)
unsigned int ix_dsp_get_tick (void)
unsigned int ix_dsp_get_flags (void)
void ix_dsp_set_config_bit1 (int enabled)
void ix_dsp_set_config_bit3 (int enabled)
int ix_dsp_get_voice_count (void)
void ix_dsp_set_voice_count (int voiceCount)
int ix_dsp_get_stream_count (void)
void ix_dsp_set_stream_count (int streamCount)
unsigned short ix_dsp_get_master_volume (void)
void ix_dsp_set_master_volume (unsigned short volume)
void ix_dsp_build_pan_tables (void)
const char * ix_dsp_result_to_text (int result)
void * ix_dsp_alloc (unsigned int bytes)
void * ix_dsp_copy (void *destination, const void *source, unsigned int bytes)
void ix_dsp_free (void *memory)

Variables

unsigned short nMasterVolume = 0xffff
HANDLE hIxPlaybackThread
HWND hPlaybackWindow
HANDLE hAudioWakeEvent
unsigned int dwMixerWriteOffset
LPDIRECTSOUND pDspDevice
unsigned int dwSoundBufferSize
unsigned int dwDspFlags
DWORD dwMixerThreadId
LPDIRECTSOUNDBUFFER pMixerBuffer
short asPanGains [512]
unsigned int dwDspTick
LPDIRECTSOUNDBUFFER pDspPrimaryBuffer

Detailed Description

DirectSound device control and shared configuration.

Originally D:\rnd\prj\ix\win95\dsp\dsp.cpp, address range 444910-44518f.

Definition in file dsp.cpp.

Macro Definition Documentation

◆ IX_DSP_FILE

#define IX_DSP_FILE   "D:\\rnd\\prj\\ix\\win95\\dsp\\dsp.cpp"

Definition at line 15 of file dsp.cpp.

Referenced by ix_dsp_init(), ix_dsp_set_stream_count(), and ix_dsp_set_voice_count().

Function Documentation

◆ ix_dsp_alloc()

void * ix_dsp_alloc ( unsigned int bytes)

◆ ix_dsp_build_pan_tables()

void ix_dsp_build_pan_tables ( void )

Definition at line 229 of file dsp.cpp.

References asPanGains, and ix_dsp_build_pan_tables().

Referenced by ix_dsp_build_pan_tables(), and ix_dsp_init().

◆ ix_dsp_configure()

void ix_dsp_configure ( int option,
void * value )

◆ ix_dsp_copy()

void * ix_dsp_copy ( void * destination,
const void * source,
unsigned int bytes )

◆ ix_dsp_free()

void ix_dsp_free ( void * memory)

Definition at line 311 of file dsp.cpp.

References ix_dsp_free().

Referenced by ix_dsp_free(), and IxSample::ix_sample_destruct().

◆ ix_dsp_get_flags()

unsigned int ix_dsp_get_flags ( void )

Definition at line 140 of file dsp.cpp.

References dwDspFlags, and ix_dsp_get_flags().

Referenced by ix_dsp_get_flags().

◆ ix_dsp_get_master_volume()

unsigned short ix_dsp_get_master_volume ( void )

Definition at line 206 of file dsp.cpp.

References ix_dsp_get_master_volume(), and nMasterVolume.

Referenced by ix_dsp_get_master_volume(), and ix_system_get_master_volume().

◆ ix_dsp_get_stream_count()

int ix_dsp_get_stream_count ( void )

Definition at line 185 of file dsp.cpp.

References ix_dsp_get_stream_count(), and nStreamCount.

Referenced by ix_dsp_get_stream_count().

◆ ix_dsp_get_tick()

unsigned int ix_dsp_get_tick ( void )

◆ ix_dsp_get_voice_count()

int ix_dsp_get_voice_count ( void )

◆ ix_dsp_init()

◆ ix_dsp_open_driver()

BOOL CALLBACK ix_dsp_open_driver ( LPGUID guid,
LPSTR description,
LPSTR module,
LPVOID context )

◆ ix_dsp_result_to_text()

const char * ix_dsp_result_to_text ( int result)

Definition at line 263 of file dsp.cpp.

References ix_dsp_result_to_text().

Referenced by ix_dsp_result_to_text(), ix_mixer_service(), and ix_mixer_thread_proc().

◆ ix_dsp_set_config_bit1()

void ix_dsp_set_config_bit1 ( int enabled)

Definition at line 146 of file dsp.cpp.

References dwDspFlags, and ix_dsp_set_config_bit1().

Referenced by ix_dsp_set_config_bit1().

◆ ix_dsp_set_config_bit3()

void ix_dsp_set_config_bit3 ( int enabled)

Definition at line 155 of file dsp.cpp.

References dwDspFlags, and ix_dsp_set_config_bit3().

Referenced by ix_dsp_set_config_bit3().

◆ ix_dsp_set_master_volume()

void ix_dsp_set_master_volume ( unsigned short volume)

Definition at line 212 of file dsp.cpp.

References dwDspFlags, pIxMalloc(), and void().

Referenced by ix_system_set_master_volume().

◆ ix_dsp_set_stream_count()

void ix_dsp_set_stream_count ( int streamCount)

◆ ix_dsp_set_voice_count()

void ix_dsp_set_voice_count ( int voiceCount)

◆ ix_dsp_shutdown()

void ix_dsp_shutdown ( void )

◆ pIxMalloc()

◆ void()

Variable Documentation

◆ asPanGains

short asPanGains[512]

Definition at line 30 of file dsp.cpp.

Referenced by ix_dsp_build_pan_tables(), IxVoice::ix_dspv_recalc_mix, and void().

◆ dwDspFlags

◆ dwDspTick

unsigned int dwDspTick

Definition at line 31 of file dsp.cpp.

Referenced by ix_dsp_get_tick(), and ix_mixer_service().

◆ dwMixerThreadId

DWORD dwMixerThreadId

Definition at line 28 of file dsp.cpp.

Referenced by ix_dsp_init().

◆ dwMixerWriteOffset

unsigned int dwMixerWriteOffset

Definition at line 24 of file dsp.cpp.

Referenced by ix_dsp_init(), and ix_mixer_service().

◆ dwSoundBufferSize

unsigned int dwSoundBufferSize

Definition at line 26 of file dsp.cpp.

Referenced by ix_mixer_service(), and ix_mixer_thread_proc().

◆ hAudioWakeEvent

HANDLE hAudioWakeEvent

Definition at line 23 of file dsp.cpp.

Referenced by ix_dsp_configure(), ix_dsp_init(), ix_dsp_shutdown(), and ix_mixer_thread_proc().

◆ hIxPlaybackThread

HANDLE hIxPlaybackThread

Definition at line 21 of file dsp.cpp.

Referenced by ix_dsp_init(), and ix_dsp_shutdown().

◆ hPlaybackWindow

HWND hPlaybackWindow

Definition at line 22 of file dsp.cpp.

Referenced by ix_dsp_configure(), and ix_dsp_open_driver().

◆ nMasterVolume

unsigned short nMasterVolume = 0xffff

◆ pDspDevice

LPDIRECTSOUND pDspDevice

◆ pDspPrimaryBuffer

LPDIRECTSOUNDBUFFER pDspPrimaryBuffer

Definition at line 32 of file dsp.cpp.

Referenced by ix_mixer_thread_proc().

◆ pMixerBuffer

LPDIRECTSOUNDBUFFER pMixerBuffer

Definition at line 29 of file dsp.cpp.

Referenced by ix_mixer_service(), and ix_mixer_thread_proc().