-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwave.h
More file actions
63 lines (61 loc) · 1.88 KB
/
wave.h
File metadata and controls
63 lines (61 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// wave.h
// playing wav files.
//
// For use with the TM4C123
// Sounds for ECE319K Lab 10
// Program written by: Devin Chaky
// 4/21/23
#ifndef __WAVE_h
#define __WAVE_h
#include <stdint.h>
// 6-bit sounds, 11.025kHz sampling
#define shootsize 4080
extern const uint8_t shoot[4080];
#define invaderkilledsize 3377
extern const uint8_t invaderkilled[3377] ;
#define explosionsize 2000
extern const uint8_t explosion[2000] ;
#define fastinvader1size 982
extern const uint8_t fastinvader1[982];
#define fastinvader2size 1042
extern const uint8_t fastinvader2[1042];
#define fastinvader3size 1054
extern const uint8_t fastinvader3[1054] ;
#define fastinvader4size 1098
extern const uint8_t fastinvader4[1098] ;
#define highpitchsize 1802
extern const uint8_t highpitch[1802];
#define flaunchsize 6204
extern const uint8_t flaunch[6204];
#define menuclicksize 2511
extern const uint8_t menuclick[2511];
#define pianosize 26344
extern const uint8_t piano[26344];
#define winsize 21891
extern const uint8_t win[21891];
//******* Wave_Start ************
// These functions do not output to the DAC.
// Rather, they set a pointer and counter, and then enables the timer interrupt.
// It starts the sound, and the timer ISR does the output
// feel free to change the parameters
// Input: pt is a pointer to an array of DAC outputs
// count is the length of the array
// Output: none
// special cases: as you wish to implement
void Wave_Start(const uint8_t *pt, uint32_t count);
// stop wave output
void Wave_Stop(void);
// start playing shoot
void Wave_Shoot(void);
// start playing invaderkilled
void Wave_Killed(void);
// start playing explosion
void Wave_Explosion(void);
// start playing highpitch
void Wave_Highpitch(void);
void Wave_Flaunch(void);
void Wave_Menuclick(void);
void Wave_Piano(void);
void Wave_Win(void);
void Wave_Init(void);
#endif