/[marvin]/marvin/src/libsip/type/discsignal.cc
ViewVC logotype

Diff of /marvin/src/libsip/type/discsignal.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by hannibal, Sat Sep 13 18:14:20 2003 UTC revision 1.13 by exos, Tue Sep 16 13:41:59 2003 UTC
# Line 111  DiscSignal &DiscSignal::concat ( DiscSig Line 111  DiscSignal &DiscSignal::concat ( DiscSig
111    
112  DiscSignal &DiscSignal::windowing( unsigned fst, unsigned snd ) const  DiscSignal &DiscSignal::windowing( unsigned fst, unsigned snd ) const
113  {  {
114    assert(fst > 0 && snd > 0 && snd > fst);  
115        assert(fst > 0 && snd > 0 && snd > fst);  
116    if (snd > this->length())    if (snd > this->length())
117      snd = length();      snd = length();
118    double *dres = (double*) memcpy(dres, (this->get_data() + fst), snd - fst);    double        *dres = (double *)malloc(sizeof(double) * (snd - fst));
119      memcpy(dres, (this->get_data() + fst), snd - fst);
120    DiscSignal *res = new DiscSignal(dres, snd - fst);    DiscSignal *res = new DiscSignal(dres, snd - fst);
121    return *res;    return *res;
122  }  }

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26