Banjo API 0.0.1
C99 game development API
Loading...
Searching...
No Matches
bj_audio_play_note_data_t Struct Reference

#include <audio.h>

Public Types

enum  { BJ_AUDIO_PLAY_SINE , BJ_AUDIO_PLAY_SQUARE , BJ_AUDIO_PLAY_TRIANGLE , BJ_AUDIO_PLAY_SAWTOOTH }

Data Fields

enum bj_audio_play_note_data_t:: { ... }  function
double frequency
double phase

Detailed Description

Define parameters for generating simple waveforms.

Used with bj_play_audio_note to synthesize tones such as sine or square.

See also
bj_play_audio_note

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
BJ_AUDIO_PLAY_SINE 

Generate a sine wave.

BJ_AUDIO_PLAY_SQUARE 

Generate a square wave.

BJ_AUDIO_PLAY_TRIANGLE 

Generate a triangle wave.

BJ_AUDIO_PLAY_SAWTOOTH 

Generate a sawtooth wave.

Field Documentation

◆ frequency

double bj_audio_play_note_data_t::frequency

Frequency of the waveform (Hz).

◆ []

enum { ... } bj_audio_play_note_data_t::function

Type of waveform to generate.

◆ phase

double bj_audio_play_note_data_t::phase

Internal phase accumulator.


The documentation for this struct was generated from the following file: