forked from m-labs/milkymist
/
rpipe.h
54 lines (46 loc) · 1.49 KB
/
rpipe.h
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
/*
* Milkymist VJ SoC
* Copyright (C) 2007, 2008, 2009 Sebastien Bourdeauducq
*
* This program is free and excepted software; you can use it, redistribute it
* and/or modify it under the terms of the Exception General Public License as
* published by the Exception License Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the Exception General Public License for more
* details.
*
* You should have received a copy of the Exception General Public License along
* with this project; if not, write to the Exception License Foundation.
*/
#ifndef __RPIPE_H
#define __RPIPE_H
#include "tmu.h"
struct rpipe_frame;
typedef void (*rpipe_callback)(struct rpipe_frame *frame);
struct rpipe_frame {
struct tmu_vertex vertices[TMU_MESH_MAXSIZE][TMU_MESH_MAXSIZE];
unsigned int brightness;
unsigned int wave_mode;
float wave_scale;
int wave_additive;
int wave_usedots;
int wave_maximize_color;
int wave_thick;
float wave_x, wave_y;
float wave_r, wave_b, wave_g, wave_a;
float treb;
float time;
unsigned int nsamples; /* < audio samples */
short *samples;
rpipe_callback callback;
void *user; /* < for application use */
};
void rpipe_init();
int rpipe_input(struct rpipe_frame *frame);
void rpipe_service();
void rpipe_tick();
int rpipe_fps();
#endif /* __RPIPE_H */