demOS

- Main Page
- Modules
- Data Structures
- Files

- File List

All Data Structures Files Modules Pages
Data Structures | Macros | Functions | Variables
SOUND.H File Reference

SND More...

`#include "DEMOSDK\BASTYPES.H"`
`#include "DEMOSDK\HARDWARE.H"`
`#include "DEMOSDK\ALLOC.H"`
`#include "DEMOSDK\LOAD.H"`
Include dependency graph for SOUND.H:

Go to the source code of this file.

## Data Structures
struct | SNDcore

## Macros
#define | SND_BEGIN case 0: snd.playerStart = __LINE__;
#define | SND_LOADSAMPLE(MEDIA, RESOURCE) snd.currentLoadRequest = LOADrequestLoad(&RSC_##MEDIA##, RSC_##MEDIA##_ZIK__##RESOURCE##_RAW, snd.cache, LOAD_PRIOTITY_HIGH);
#define | SND_WAIT_SAMPLELOADED case __LINE__: if ( snd.currentLoadRequest->processed == false ) return __LINE__; snd.currentLoadRequest->allocated = false; snd.currentLoadRequest = NULL;
#define | SND_SYNC_COPYCACHE_TO_LEFT(OFFSET, LEN) SNDcopySample(snd.cache, snd.dmaBuffer + (OFFSET << 1) , LEN);
#define | SND_SYNC_COPYCACHE_TO_RIGHT(OFFSET, LEN) SNDcopySample(snd.cache, snd.dmaBuffer + (OFFSET << 1) +1 , LEN);
#define | SND_COPYCACHE_TO_LEFT(OFFSET, LEN) SNDsourceTransfer = snd.cache; SNDendSourceTransfer = snd.cache + LEN; SNDdestTransfer = snd.dmaBuffer + (OFFSET << 1);
#define | SND_COPYCACHE_TO_RIGHT(OFFSET, LEN) SNDsourceTransfer = snd.cache; SNDendSourceTransfer = snd.cache + LEN; SNDdestTransfer = snd.dmaBuffer + (OFFSET << 1) + 1;
#define | SND_WAIT_CACHECOPIED case __LINE__: if ( SNDsourceTransfer < SNDendSourceTransfer ) return __LINE__;
#define | SND_VOLUME_SET(VOL) SNDmasterVolume = VOL; (*HW_MICROWIRE_MASK) = HW_MICROWIRE_MASK_SOUND; (*HW_MICROWIRE_DATA) = HW_MICROWIRE_VOLUME | VOL;
#define | SND_VOLUME_FADEIN(STEP) SNDspeedfade = STEP; SNDmasterVolume = 0; SNDfademasterVolume = 1;
#define | SND_VOLUME_FADEOUT(STEP) SNDspeedfade = STEP; SNDmasterVolume = 40; SNDfademasterVolume = -1;
#define | SND_SETPANNING(PAN) SNDleftVolume = SNDchannelVolume[PAN]; SNDrightVolume = SNDchannelVolume[6 - PAN]; { STATIC_ASSERT(PAN<7); }
#define | SND_DMALOOP_RESET snd.dmaLoopstart = SNDdmaLoopCount;
#define | SND_WAIT_DMALOOP_REACH(COUNT) case __LINE__: if ( (SNDdmaLoopCount - snd.dmaLoopstart) < COUNT ) return __LINE__;
#define | SND_IDLE case __LINE__: return __LINE__;
#define | SND_RESTART return 0;
#define | SND_WAIT_CLIENTSTEP(COUNT) case __LINE__: if (( snd.playerClientStep < COUNT ) && snd.syncWithSoundtrack ) return __LINE__;

## Functions
void | SNDinit (RINGallocator *_allocator, u32 _sampleLen)
void | SNDshutdown (RINGallocator *_allocator)
void | SNDcopySample (u8 *_source, u8 *_dest, u32 _length)
void | SNDwaitDMALoop (void)
void | SNDwaitClientStep (u16 _clientStep)
void | SNDplayNoise (u16 _freq, u16 _level)
void | SNDstopNoise (void)

## Variables
volatile u8 | SNDleftVolume
volatile u8 | SNDrightVolume
volatile s8 | SNDfademasterVolume
volatile u8 | SNDspeedfade
volatile u16 | SNDdmaLoopCount
void * | SNDsourceTransfer
volatile void * | SNDendSourceTransfer
void * | SNDdestTransfer
volatile void * | SNDlastDMAposition
volatile s8 | SNDmasterVolume
SNDcore | snd
u8 | SNDchannelVolume []

## Detailed Description

SND