Stardew Engine
Loading...
Searching...
No Matches
Audio.c File Reference
#include "Audio.h"
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <float.h>
#include "AL/al.h"
#include "AL/alc.h"
#include "AL/alext.h"
#include "Log.h"
#include <stdlib.h>
#include <math.h>
#include "EngineUtils.h"
#include "AssertLib.h"
Include dependency graph for Audio.c:

Macros

#define PI   3.14159265358979323846
 
#define PI2   (2.0 * PI)
 
#define MAX(x, y)   (((x) > (y)) ? (x) : (y))
 
#define MIN(x, y)   (((x) < (y)) ? (x) : (y))
 

Functions

int zzfx_Generate (float *buffer, int bufferSize, float sampleRate, struct ZZFXSound *inSfx)
 a port of https://github.com/KilledByAPixel/ZzFX - far from perfect
 
float Au_PlaySoundTest (struct ZZFXSound *sound, float masterVol)
 
int Au_Init (char ***argv, int *argc)
 
void Au_DeInit ()
 
float signf (float v)
 
float RandFloat01 ()
 
int SafeMod (int a, int b)
 

Variables

ALCint gDevRate = 0
 
ALuint gBasicSource = -1
 

Macro Definition Documentation

◆ MAX

#define MAX (   x,
 
)    (((x) > (y)) ? (x) : (y))

◆ MIN

#define MIN (   x,
 
)    (((x) < (y)) ? (x) : (y))

◆ PI

#define PI   3.14159265358979323846

◆ PI2

#define PI2   (2.0 * PI)

Function Documentation

◆ Au_DeInit()

void Au_DeInit ( )

◆ Au_Init()

int Au_Init ( char ***  argv,
int *  argc 
)

◆ Au_PlaySoundTest()

float Au_PlaySoundTest ( struct ZZFXSound sound,
float  masterVol 
)

◆ RandFloat01()

float RandFloat01 ( )

◆ SafeMod()

int SafeMod ( int  a,
int  b 
)

◆ signf()

float signf ( float  v)

◆ zzfx_Generate()

int zzfx_Generate ( float *  buffer,
int  bufferSize,
float  sampleRate,
struct ZZFXSound inSfx 
)

a port of https://github.com/KilledByAPixel/ZzFX - far from perfect

Parameters
bufferbuffer to populate
bufferSizemax size of buffer
sampleRatesample rate
inSfxparameters to generate sound effect
Returns
number of samples output

Variable Documentation

◆ gBasicSource

ALuint gBasicSource = -1

◆ gDevRate

ALCint gDevRate = 0