aboutsummaryrefslogtreecommitdiff
path: root/shmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'shmem.c')
-rw-r--r--shmem.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/shmem.c b/shmem.c
index 53dd11c..dfc24bb 100644
--- a/shmem.c
+++ b/shmem.c
@@ -11,7 +11,7 @@ typedef struct shmem
int segment_size;
} t_shmem;
-inline t_float min(t_float x1,t_float x2)
+static inline t_float min(t_float x1,t_float x2)
{
if (x1 <= x2) {
return x1;
@@ -126,13 +126,11 @@ void shmem_dump(t_shmem *x, t_symbol *unused, int argc, t_atom *argv)
void shmem_read(t_shmem *x, t_float index)
{
- int i, vecsize, index_max, shmem_offset;
- t_garray *a;
- t_word *vec;
+ int shmem_offset;
shmem_offset = index;
if (shmem_offset < 0) shmem_offset = 0;
- if (shmem_offset > x->segment_size-1) i = x->segment_size-1;
+ if (shmem_offset > x->segment_size-1) shmem_offset = x->segment_size-1;
// post("i=%d", offset);
outlet_float(x->x_obj.ob_outlet, x->share_memory[shmem_offset]);
}