[ Home ]

adlib.h File Reference

Interface to adlib hardware. More...

#include "../../common/platform.h"

Include dependency graph for adlib.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Instrument
struct  SoundCommon
struct  AdLibSound

Functions

wtBoolean ADLIB_Init ()
void ADLIB_Shutdown ()
 Shutdown adlib hardware.
void * ADLIB_DecodeSound (AdLibSound *sound, W32 *length)
 Decode adlib sound.
W32 ADLIB_getLength (void *musbuffer)
 Get music length in milliseconds.
void ADLIB_LoadMusic (void *musbuffer)
 Setup music decoder.
W32 ADLIB_UpdateMusic (W32 size, void *buffer)
 Decode adlib music sound.


Detailed Description

Interface to adlib hardware.

Author:
Michael Liebscher
Date:
2004
Note:
This code was derived from Wolfenstein 3-D, and was originally written by Id Software, Inc.

Function Documentation

void* ADLIB_DecodeSound ( AdLibSound *  sound,
W32 *  length 
)

Decode adlib sound.

Parameters:
[in] inst Valid pointer to Instrument structure.
[out] length Length of decoded sound data in bytes.
Returns:
On success true, otherwise false.

Here is the call graph for this function:

Here is the caller graph for this function:

W32 ADLIB_getLength ( void *  musbuffer  ) 

Get music length in milliseconds.

Parameters:
[in] musbuffer musicGroup_t data structure.
[in,out] buffer Hold decoded sound data.
Returns:
On success length in milliseconds.

Here is the caller graph for this function:

void ADLIB_LoadMusic ( void *  musbuffer  ) 

Setup music decoder.

Parameters:
[in] musbuffer musicGroup_t data structure.
Returns:
Nothing.

Here is the caller graph for this function:

W32 ADLIB_UpdateMusic ( W32  size,
void *  buffer 
)

Decode adlib music sound.

Parameters:
[in] size Number of bytes to write to buffer.
[in,out] buffer Hold decoded sound data.
Returns:
1 on success, otherwise 0.
Note:
Data written to buffer is 44100/16/mono

Here is the caller graph for this function: