Skip to content

Commit

Permalink
sampling: remove extra function call
Browse files Browse the repository at this point in the history
  • Loading branch information
romanz committed Aug 8, 2014
1 parent 449d74c commit f79c4c1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions amodem/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ def __iter__(self):
return self

def next(self):
return self._sample() * self.gain

__next__ = next

def _sample(self):
offset = self.offset
# offset = k + (j / self.resolution)
k = int(offset) # integer part
Expand All @@ -64,7 +59,10 @@ def _sample(self):
self.index += 1

self.offset += self.freq
return np.dot(coeffs, self.buff)
return np.dot(coeffs, self.buff) * self.gain

__next__ = next


if __name__ == '__main__':
import common
Expand Down

0 comments on commit f79c4c1

Please sign in to comment.