FreeRTOS Tetris
TUM_Sound.h
Go to the documentation of this file.
1 
24 #ifndef __TUM_SOUND_H__
25 #define __TUM_SOUND_H__
26 
40 #define GEN_ENUM(ENUM) ENUM,
45 #define FOR_EACH_SAMPLE(SAMPLE) \
46  SAMPLE(a3) \
47  SAMPLE(a4) \
48  SAMPLE(a5) \
49  SAMPLE(b3) \
50  SAMPLE(b4) \
51  SAMPLE(c3) \
52  SAMPLE(c4) \
53  SAMPLE(c5) \
54  SAMPLE(d3) \
55  SAMPLE(d4) \
56  SAMPLE(d5) \
57  SAMPLE(e3) \
58  SAMPLE(e4) \
59  SAMPLE(e5) \
60  SAMPLE(f3) \
61  SAMPLE(f4) \
62  SAMPLE(f5) \
63  SAMPLE(g3) \
64  SAMPLE(g4) \
65  SAMPLE(g5)
66 
76 
84 int tumSoundInit(char *bin_dir_str);
85 
89 void tumSoundExit(void);
90 
98 void tumSoundPlaySample(unsigned char index);
99 
110 int tumSoundLoadUserSample(const char *filepath);
111 
122 int tumSoundPlayUserSample(const char *filename);
123 
126 #endif
tumSoundPlayUserSample
int tumSoundPlayUserSample(const char *filename)
Plays a loaded waveform.
Definition: TUM_Sound.c:170
GEN_ENUM
#define GEN_ENUM(ENUM)
Definition: TUM_Sound.h:40
FOR_EACH_SAMPLE
#define FOR_EACH_SAMPLE(SAMPLE)
Definition: TUM_Sound.h:45
tumSoundPlaySample
void tumSoundPlaySample(unsigned char index)
Plays a wav sample.
Definition: TUM_Sound.c:115
tumSoundInit
int tumSoundInit(char *bin_dir_str)
Initializes the SDL2 Mixer library and loads the wav samples specified in the tumSound_samples_e.
Definition: TUM_Sound.c:41
tumSound_samples_e
tumSound_samples_e
Enum containing the currently loaded wav samples.
Definition: TUM_Sound.h:75
tumSoundExit
void tumSoundExit(void)
Deinitializes the SDL2 Mixer library.
Definition: TUM_Sound.c:30
tumSoundLoadUserSample
int tumSoundLoadUserSample(const char *filepath)
Loads a .wav sample from disk.
Definition: TUM_Sound.c:124