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

Sample stream control. More...

#include <signal.h>
#include "ix.h"
#include <stdlib.h>

Go to the source code of this file.

Functions

void ix_dsps_alloc (int stream, unsigned int size, int freq, int bps, int channels)
void ix_dsps_free (int stream)
void ix_dsps_prepare (int stream)
void ix_dsps_play (int stream)
void ix_dsps_stop (int stream)
void ix_dsps_set_volume (int stream, unsigned short vol)
unsigned int ix_dsps_get_flags (int stream)
int ix_dsps_get_buffer_free (int streamIndex)
void ix_dsps_lock (int stream, unsigned int requestedBytes, unsigned char **buffer, unsigned int *lockedBytes)
void ix_dsps_unlock (int stream)

Variables

int nStreamCount
int nAllocatedStreams
IxStream streams [2]

Detailed Description

Sample stream control.

Originally D:\rnd\prj\ix\win95\dsp\dsps.cpp, address range 445190-445f5f: compiler-generated initializers, then ten stream-control functions. Built /Od /Oi like the rest of ix.

A stream is a ring buffer fed by the streamer thread and played through a voice slot allocated after the regular voices: voice[voice_count + index].

Definition in file dsps.cpp.

Function Documentation

◆ ix_dsps_alloc()

void ix_dsps_alloc ( int stream,
unsigned int size,
int freq,
int bps,
int channels )

Definition at line 22 of file dsps.cpp.

References streams.

Referenced by ix_streamer_open_stream_file().

◆ ix_dsps_free()

void ix_dsps_free ( int stream)

Definition at line 80 of file dsps.cpp.

Referenced by ix_streamer_close_stream_file().

◆ ix_dsps_get_buffer_free()

int ix_dsps_get_buffer_free ( int streamIndex)

Definition at line 210 of file dsps.cpp.

Referenced by ix_streamer_service_audio(), and ix_thread_service_streams().

◆ ix_dsps_get_flags()

unsigned int ix_dsps_get_flags ( int stream)

Definition at line 199 of file dsps.cpp.

References IX_DSPS_FILE, ix_log_printf(), and nStreamCount.

◆ ix_dsps_lock()

void ix_dsps_lock ( int stream,
unsigned int requestedBytes,
unsigned char ** buffer,
unsigned int * lockedBytes )

Definition at line 246 of file dsps.cpp.

References ix_log_printf().

Referenced by ix_thread_lock_stream_buffer().

◆ ix_dsps_play()

void ix_dsps_play ( int stream)

Definition at line 126 of file dsps.cpp.

References IX_STREAM_ALLOCATED, and streams.

Referenced by ix_streamer_service_audio(), and ix_streamer_thread_proc().

◆ ix_dsps_prepare()

void ix_dsps_prepare ( int stream)

Definition at line 101 of file dsps.cpp.

References nAllocatedStreams.

Referenced by ix_streamer_service_audio(), and ix_streamer_thread_proc().

◆ ix_dsps_set_volume()

void ix_dsps_set_volume ( int stream,
unsigned short vol )

Definition at line 175 of file dsps.cpp.

Referenced by ix_streamer_open_stream_file(), and ix_streamer_set_volume().

◆ ix_dsps_stop()

void ix_dsps_stop ( int stream)

◆ ix_dsps_unlock()

void ix_dsps_unlock ( int stream)

Definition at line 277 of file dsps.cpp.

Referenced by ix_thread_lock_stream_buffer().

Variable Documentation

◆ nAllocatedStreams

int nAllocatedStreams

◆ nStreamCount

◆ streams