Changeset b849106 for src/lvec.c


Ignore:
Timestamp:
Oct 19, 2009, 2:58:31 PM (11 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
3f99693
Parents:
b01bd4a
Message:

src/lvec.{c,h}: add some utils

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lvec.c

    rb01bd4a rb849106  
    7575}
    7676
     77void lvec_set(lvec_t *s, smpl_t val) {
     78  uint_t i,j;
     79  for (i=0; i< s->channels; i++) {
     80    for (j=0; j< s->length; j++) {
     81      s->data[i][j] = val;
     82    }
     83  }
     84}
     85
     86void lvec_zeros(lvec_t *s) {
     87  lvec_set(s, 0.);
     88}
     89
     90void lvec_ones(lvec_t *s) {
     91  lvec_set(s, 1.);
     92}
     93
Note: See TracChangeset for help on using the changeset viewer.