Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: m-labs/flickernoise
base: a1adbc3
...
head fork: m-labs/flickernoise
compare: 5163408
  • 2 commits
  • 8 files changed
  • 0 commit comments
  • 1 contributor
Commits on Jan 12, 2012
@wpwrak wpwrak compiler: off-by-one error in forall_syms
test/wundef found this, but only sometimes.
5a386a3
@wpwrak wpwrak added FN variable "frame" 5163408
View
2  src/compiler/compiler.h
@@ -77,6 +77,7 @@ enum {
pfv_tex_wrap,
pfv_time,
+ pfv_frame,
pfv_bass,
pfv_mid,
pfv_treb,
@@ -164,6 +165,7 @@ enum {
pvv_zoom,
pvv_time,
+ pvv_frame,
pvv_bass,
pvv_mid,
pvv_treb,
View
1  src/compiler/fnp.ids
@@ -60,6 +60,7 @@ mv_a pfv_mv_a -1
bTexWrap pfv_tex_wrap -1
time pfv_time pvv_time
+frame pfv_frame pvv_frame
bass pfv_bass pvv_bass
mid pfv_mid pvv_mid
treb pfv_treb pvv_treb
View
2  src/compiler/symtab.h
@@ -34,7 +34,7 @@ extern int num_user_syms;
#define forall_syms(p) \
for ((p) = well_known; (p) != user_syms+num_user_syms; \
- (p) = (p) == well_known+num_well_known ? user_syms : (p)+1)
+ (p) = (p) == well_known+num_well_known-1 ? user_syms : (p)+1)
void symtab_init(void);
struct sym *unique(const char *s);
View
2  src/compiler/test/nsyms
@@ -26,7 +26,7 @@ forall_patches count_syms
echo $max,$ns/$np >_out
expect <<EOF
-12,112/60
+12,111/60
EOF
###############################################################################
View
4 src/gui/monitor.c
@@ -31,7 +31,7 @@ static int appid;
static int w_open;
-static float time2;
+static float time2, frame;
static float bass, mid, treb;
static float bass_att, mid_att, treb_att;
static float idmx[IDMX_COUNT];
@@ -43,6 +43,7 @@ static void sampler_callback(struct frame_descriptor *frd)
int i;
time2 = frd->time;
+ frame = frd->frame;
bass = frd->bass;
mid = frd->mid;
@@ -64,6 +65,7 @@ static void sampler_callback(struct frame_descriptor *frd)
static float *get_variable(const char *name)
{
if(strcmp(name, "time") == 0) return &time2;
+ if(strcmp(name, "frame") == 0) return &frame;
else if(strcmp(name, "bass") == 0) return &bass;
else if(strcmp(name, "mid") == 0) return &mid;
View
2  src/renderer/eval.c
@@ -72,6 +72,7 @@ static void transfer_pvv_regs(struct patch *p)
write_pvv(p, pvv_zoom, read_pfv(p, pfv_zoom));
write_pvv(p, pvv_time, read_pfv(p, pfv_time));
+ write_pvv(p, pvv_frame, read_pfv(p, pfv_frame));
write_pvv(p, pvv_bass, read_pfv(p, pfv_bass));
write_pvv(p, pvv_mid, read_pfv(p, pfv_mid));
write_pvv(p, pvv_treb, read_pfv(p, pfv_treb));
@@ -135,6 +136,7 @@ static void reinit_all_pfv(struct patch *p)
static void set_pfv_from_frd(struct patch *p, struct frame_descriptor *frd)
{
write_pfv(p, pfv_time, frd->time);
+ write_pfv(p, pfv_time, frd->frame);
write_pfv(p, pfv_bass, frd->bass);
write_pfv(p, pfv_mid, frd->mid);
write_pfv(p, pfv_treb, frd->treb);
View
1  src/renderer/framedescriptor.h
@@ -49,6 +49,7 @@ struct frame_descriptor {
int status;
float time;
+ float frame;
struct snd_buffer *snd_buf;
float bass, mid, treb;
float bass_att, mid_att, treb_att;
View
5 src/renderer/sampler.c
@@ -104,6 +104,7 @@ static rtems_task sampler_task(rtems_task_argument argument)
frd_callback callback = (frd_callback)argument;
rtems_event_set dummy;
float time;
+ int frame;
snd_fd = open("/dev/snd", O_RDWR);
if(snd_fd == -1) {
@@ -128,7 +129,8 @@ static rtems_task sampler_task(rtems_task_argument argument)
}
}
- time = 0.0;
+ time = 0;
+ frame = 0;
while(rtems_event_receive(RTEMS_EVENT_0, RTEMS_NO_WAIT, RTEMS_NO_TIMEOUT, &dummy) != RTEMS_SUCCESSFUL) {
struct snd_buffer *recorded_buf;
@@ -188,6 +190,7 @@ static rtems_task sampler_task(rtems_task_argument argument)
recorded_descriptor = (struct frame_descriptor *)recorded_buf->user;
/* Analyze */
analyze_snd(recorded_descriptor, &history);
+ recorded_descriptor->frame = frame++;
recorded_descriptor->time = time;
time += 1.0/FPS;
/* Get DMX/OSC/MIDI inputs */

No commit comments for this range

Something went wrong with that request. Please try again.