reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
audio_loop.h
Go to the documentation of this file.
1
37#ifndef AUDIO_LOOP_H
38#define AUDIO_LOOP_H
39
40#include "wave_file_reader.h" // Defines lf_waveform_t.
41#include "tag.h" // Defines instant_t.
42
43// Constants for playback. These are all coupled.
44#define SAMPLE_RATE 44100
45#define AUDIO_BUFFER_SIZE 4410 // 1/10 second, 100 msec
46#define BUFFER_DURATION_NS 100000000LL
47#define NUM_CHANNELS 1 // 2 for stereo
48
49#define MAX_AMPLITUDE 32765
50
51#define NUM_NOTES 8 // Maximum number of notes that can play simultaneously.
52
61
66
84int lf_play_audio_waveform(lf_waveform_t* waveform, float emphasis, instant_t start_time);
85
86#endif // AUDIO_LOOP_H
int lf_play_audio_waveform(lf_waveform_t *waveform, float emphasis, instant_t start_time)
Definition audio_loop_linux.c:296
void lf_stop_audio_loop()
Definition audio_loop_linux.c:294
void lf_start_audio_loop(instant_t start_time)
Definition audio_loop_linux.c:272
instant_t start_time
Definition tag.c:33
Definition wave_file_reader.h:47
Time and tag definitions and functions for Lingua Franca.
int64_t instant_t
Definition tag.h:63
Utility function for reading WAV audio files.