[ Home ]

wolfcore_audio.c File Reference

Interface to Adlib sound/music decoder. More...

#include <stdio.h>
#include "../../common/platform.h"
#include "../../common/common_utils.h"
#include "../../string/wtstring.h"
#include "../../memory/memory.h"
#include "../../filesys/file.h"
#include "../../console/console.h"
#include "../core/adlib.h"
#include "../../loaders/wav.h"
#include "../../vorbis/vorbisenc_inter.h"

Include dependency graph for wolfcore_audio.c:


Functions

PUBLIC wtBoolean AudioFile_Setup (const char *aheadfname, const char *audfname)
 Setup for audio decoding.
PUBLIC void AudioFile_Shutdown (void)
 Shutdown audio decoder.
PUBLIC void * AudioFile_CacheAudioChunk (W32 chunk)
 Cache audio data.
PUBLIC void AudioFile_dataByteSwap (void *data, SW32 length)
 Endian byte swapping for wav file.
PUBLIC wtBoolean AudioFile_ReduxDecodeSound (W32 start, W32 end, const char *path)
 Decode sound fx.
PUBLIC wtBoolean AudioFile_ReduxDecodeMusic (W32 start, W32 end, const char *path, char *songNames[])
 Decode music chunks.

Variables

PRIVATE FILE * audiohandle
PRIVATE W32 * audiostarts
wtBoolean _saveAudioAsWav

Detailed Description

Interface to Adlib sound/music decoder.

Author:
Michael Liebscher
Date:
2006-2009

Function Documentation

PUBLIC void* AudioFile_CacheAudioChunk ( W32  chunk  ) 

Cache audio data.

Parameters:
[in] chunk Id of chunk to cache.
Returns:
On success pointer to raw data, otherwise NULL.

Here is the caller graph for this function:

PUBLIC void AudioFile_dataByteSwap ( void *  data,
SW32  length 
)

Endian byte swapping for wav file.

Parameters:
[in,out] Data to byte swap.
[in] length Length of data in bytes.
Returns:
Nothing.
Note:
Call this function on Big Endian systems.

Here is the caller graph for this function:

PUBLIC wtBoolean AudioFile_ReduxDecodeMusic ( W32  start,
W32  end,
const char *  path,
char *  songNames[] 
)

Decode music chunks.

Parameters:
[in] start Start of music chunks.
[in] end End of music chunks.
[in] songNames Song titles.
Returns:
On success true, otherwise false.

Here is the call graph for this function:

Here is the caller graph for this function:

PUBLIC wtBoolean AudioFile_ReduxDecodeSound ( W32  start,
W32  end,
const char *  path 
)

Decode sound fx.

Parameters:
[in] start Start of sound fx chunks.
[in] end End of sound fx chunks.
[in] path Directory path to save file to.
Returns:
On success true, otherwise false.

Here is the call graph for this function:

Here is the caller graph for this function:

PUBLIC wtBoolean AudioFile_Setup ( const char *  aheadfname,
const char *  audfname 
)

Setup for audio decoding.

Parameters:
[in] aheadfname Audio header file name.
[in] audfname Audio file name.
Returns:
On success true, otherwise false.

Here is the call graph for this function:

Here is the caller graph for this function:

PUBLIC void AudioFile_Shutdown ( void   ) 

Shutdown audio decoder.

Returns:
Nothing.

Here is the caller graph for this function: