FreeRTOS Emulator with SDL2 Based Graphics and Input Library  1.0
A POSIX wrapper to run FreeRTOS on an x86 machine with some basic input and output libraries aimed at making teaching FreeRTOS simpler.
gfx_sound.h
Go to the documentation of this file.
1 
24 #ifndef __GFX_SOUND_H__
25 #define __GFX_SOUND_H__
26 
39 #define GEN_ENUM(ENUM) ENUM,
44 #define FOR_EACH_SAMPLE(SAMPLE) \
45  SAMPLE(a3) \
46  SAMPLE(a4) \
47  SAMPLE(a5) \
48  SAMPLE(b3) \
49  SAMPLE(b4) \
50  SAMPLE(c3) \
51  SAMPLE(c4) \
52  SAMPLE(c5) \
53  SAMPLE(d3) \
54  SAMPLE(d4) \
55  SAMPLE(d5) \
56  SAMPLE(e3) \
57  SAMPLE(e4) \
58  SAMPLE(e5) \
59  SAMPLE(f3) \
60  SAMPLE(f4) \
61  SAMPLE(f5) \
62  SAMPLE(g3) \
63  SAMPLE(g4) \
64  SAMPLE(g5)
65 
75 
83 int gfxSoundInit(char *bin_dir_str);
84 
88 void gfxSoundExit(void);
89 
96 void gfxSoundPlaySample(unsigned char index);
97 
108 int gfxSoundLoadUserSample(const char *filepath);
109 
120 int gfxSoundPlayUserSample(const char *filename);
121 
124 #endif
gfxSound_samples_e
Enum containing the currently loaded wav samples.
Definition: gfx_sound.h:74
void gfxSoundPlaySample(unsigned char index)
Plays a wav sample.
Definition: gfx_sound.c:140
void gfxSoundExit(void)
Deinitializes the SDL2 Mixer library.
Definition: gfx_sound.c:54
int gfxSoundLoadUserSample(const char *filepath)
Loads a .wav sample from disk.
Definition: gfx_sound.c:149
int gfxSoundPlayUserSample(const char *filename)
Plays a loaded waveform.
Definition: gfx_sound.c:195
#define FOR_EACH_SAMPLE(SAMPLE)
Definition: gfx_sound.h:44
#define GEN_ENUM(ENUM)
Definition: gfx_sound.h:39
int gfxSoundInit(char *bin_dir_str)
Initializes the SDL2 Mixer library and loads the wav samples specified in the gfxSound_samples_e.
Definition: gfx_sound.c:65