Wing Commander II
Reconstructed Win32 source (1996)
Loading...
Searching...
No Matches
speech.c File Reference

Speech packets and speech cache. More...

#include "game.h"

Go to the source code of this file.

Macros

#define SPEECH_C

Functions

void SoundBlasterOut (unsigned short port, unsigned char value)
unsigned char SoundBlasterIn (unsigned short port)
void SoundBlasterWaitWrite (void)
void * LoadSpeechPacketIntoBuffer (char *fileName, short section, void *destination)
void PlaySpeechPacketBuffer (void *packet, unsigned short packetSize, int interrupt)
void LoadAndPlaySpeechPacket (char *fileName, short section)
void SoundBlasterEndOfInterrupt (void)
void StopDigiPlayback (void)
void SoundBlasterDspInterrupt (void)
short InitializeSoundBlaster (short port, short irq)
void ShutdownSoundBlaster (void)

Variables

const int g_nDigiSampleBytes = 0xfffa
const unsigned short g_wDmaHalfBytes = 0x0fa0
unsigned short g_wSoundBlasterPort = 0x220
unsigned short g_wSoundBlasterIrq = 7
unsigned short g_wDigiPlaying = 0
unsigned short g_wDmaAddressA = 0
unsigned short g_wDmaAddressB = 0
unsigned short g_wDmaCountA = 0
unsigned short g_wDmaCountB = 0
int g_nDmaHalfSelect = 0
short g_nDigiLastBlock = 0
void * g_4_pDmaBufferPointer
unsigned short g_2_wDigiPosition
void * g_pDigiSample
unsigned char g_1_ucDmaPageValue

Detailed Description

Speech packets and speech cache.

Definition in file speech.c.

Macro Definition Documentation

◆ SPEECH_C

#define SPEECH_C

Definition at line 6 of file speech.c.

Function Documentation

◆ InitializeSoundBlaster()

◆ LoadAndPlaySpeechPacket()

void LoadAndPlaySpeechPacket ( char * fileName,
short section )

◆ LoadSpeechPacketIntoBuffer()

void * LoadSpeechPacketIntoBuffer ( char * fileName,
short section,
void * destination )

◆ PlaySpeechPacketBuffer()

◆ ShutdownSoundBlaster()

void ShutdownSoundBlaster ( void )

◆ SoundBlasterDspInterrupt()

◆ SoundBlasterEndOfInterrupt()

◆ SoundBlasterIn()

unsigned char SoundBlasterIn ( unsigned short port)

Definition at line 32 of file speech.c.

References SoundBlasterIn().

Referenced by DrawTextAt(), SoundBlasterDspInterrupt(), and SoundBlasterIn().

◆ SoundBlasterOut()

void SoundBlasterOut ( unsigned short port,
unsigned char value )

◆ SoundBlasterWaitWrite()

void SoundBlasterWaitWrite ( void )

Definition at line 39 of file speech.c.

References SoundBlasterWaitWrite().

Referenced by DrawTextAt(), SoundBlasterDspInterrupt(), and SoundBlasterWaitWrite().

◆ StopDigiPlayback()

void StopDigiPlayback ( void )

Definition at line 129 of file speech.c.

References g_wDigiPlaying, and StopDigiPlayback().

Referenced by DrawTextAt(), SoundBlasterDspInterrupt(), and StopDigiPlayback().

Variable Documentation

◆ g_1_ucDmaPageValue

unsigned char g_1_ucDmaPageValue

Definition at line 281 of file speech.c.

Referenced by InitializeSoundBlaster(), and SoundBlasterDspInterrupt().

◆ g_2_wDigiPosition

unsigned short g_2_wDigiPosition

Definition at line 279 of file speech.c.

Referenced by PlaySpeechPacketBuffer(), and SoundBlasterDspInterrupt().

◆ g_4_pDmaBufferPointer

void* g_4_pDmaBufferPointer

◆ g_nDigiLastBlock

short g_nDigiLastBlock = 0

Definition at line 20 of file speech.c.

Referenced by PlaySpeechPacketBuffer(), and SoundBlasterDspInterrupt().

◆ g_nDigiSampleBytes

const int g_nDigiSampleBytes = 0xfffa

◆ g_nDmaHalfSelect

int g_nDmaHalfSelect = 0

Definition at line 19 of file speech.c.

Referenced by PlaySpeechPacketBuffer(), and SoundBlasterDspInterrupt().

◆ g_pDigiSample

void* g_pDigiSample

Definition at line 280 of file speech.c.

Referenced by InitializeSoundBlaster(), LoadAndPlaySpeechPacket(), and ShutdownSoundBlaster().

◆ g_wDigiPlaying

◆ g_wDmaAddressA

unsigned short g_wDmaAddressA = 0

Definition at line 15 of file speech.c.

Referenced by InitializeSoundBlaster(), and SoundBlasterDspInterrupt().

◆ g_wDmaAddressB

unsigned short g_wDmaAddressB = 0

Definition at line 16 of file speech.c.

Referenced by InitializeSoundBlaster(), and SoundBlasterDspInterrupt().

◆ g_wDmaCountA

unsigned short g_wDmaCountA = 0

Definition at line 17 of file speech.c.

Referenced by PlaySpeechPacketBuffer(), and SoundBlasterDspInterrupt().

◆ g_wDmaCountB

unsigned short g_wDmaCountB = 0

Definition at line 18 of file speech.c.

Referenced by PlaySpeechPacketBuffer(), and SoundBlasterDspInterrupt().

◆ g_wDmaHalfBytes

const unsigned short g_wDmaHalfBytes = 0x0fa0

◆ g_wSoundBlasterIrq

unsigned short g_wSoundBlasterIrq = 7

Definition at line 13 of file speech.c.

Referenced by InitializeSoundBlaster().

◆ g_wSoundBlasterPort

unsigned short g_wSoundBlasterPort = 0x220

Definition at line 12 of file speech.c.

Referenced by InitializeSoundBlaster(), and SoundBlasterDspInterrupt().