summaryrefslogtreecommitdiff
path: root/project/Core/Inc/Project/player.h
blob: 1b1d308724c665e0f98de62ff0322fc71a30a174 (plain) (blame)
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
/*
 * player.h
 *
 *  Created on: Dec 10, 2025
 *      Author: sowgro
 */

#ifndef INC_PROJECT_PLAYER_H_
#define INC_PROJECT_PLAYER_H_

typedef struct {
	uint8_t ev_type;
	uint32_t abs_time;
	uint8_t key_number;
	uint8_t value;
} note_event_t;

typedef struct {
	note_event_t events[1024];
	int nEvents;
	int curEventIndex;
} track_t;

void play_notes(int count);

void parse_song(uint8_t *p_song);

uint8_t *parse_track(uint8_t *p_song, track_t *track);

#endif /* INC_PROJECT_PLAYER_H_ */