coastline 0.0.4
Loading...
Searching...
No Matches
soundmix.h File Reference
#include "common/types.h"
Include dependency graph for soundmix.h:

Go to the source code of this file.

Macros

#define SAMPLE_RATE   11000.0f
#define STEP_ONE   4294967296.0

Typedefs

typedef f32 SoundReal
 The precision used for Nintendo 64 sound-mixing calculations.

Functions

static u64 FrequencyStep (SoundReal frequency)
static f32 UpperVolume (s32 volume, f32 upper)
static u32 PackVolume (s32 volume, f32 upper, f32 lower)

Macro Definition Documentation

◆ SAMPLE_RATE

#define SAMPLE_RATE   11000.0f

The mixing rate, in samples per second.

◆ STEP_ONE

#define STEP_ONE   4294967296.0

One unit in the 32.32 sample-position format.

Typedef Documentation

◆ SoundReal

typedef f32 SoundReal

The precision used for Nintendo 64 sound-mixing calculations.

Function Documentation

◆ FrequencyStep()

u64 FrequencyStep ( SoundReal frequency)
inlinestatic
Returns
The 32.32 sample-position step for frequency.

◆ UpperVolume()

f32 UpperVolume ( s32 volume,
f32 upper )
inlinestatic
Returns
The upper half of a channel's packed volume.

◆ PackVolume()

u32 PackVolume ( s32 volume,
f32 upper,
f32 lower )
inlinestatic
Returns
The packed volume panned between its upper and lower halves.