Giter VIP home page Giter VIP logo

upfirdn's People

Contributors

sirtom67 avatar

Watchers

 avatar  avatar

upfirdn's Issues

Fails for long audio waveforms

What steps will reproduce the problem?
1. Get a long audio waveform
2. Run upfirdn
3. Returns negative dimension errors in numpy

What is the expected output? What do you see instead?
We expect the files to be processed, but we get a numpy exception

What version of the product are you using? On what operating system?
Latest. Ubuntu 12.04

Please provide any additional information below.

The problem comes from int precision with long files and resampling ratios.
A cast to unsigned long as to be performed to compute the needed sample count 
out.

Here's the diff to solve it

diff -r 8182188fd9ef upfirdn/Resampler.h
--- a/upfirdn/Resampler.h   Sun Jan 02 22:14:30 2011 -0600
+++ b/upfirdn/Resampler.h   Thu Jun 20 14:53:27 2013 -0700
@@ -134,7 +134,7 @@
 int Resampler<S1, S2, C>::neededOutCount(int inCount)
 /* compute how many outputs will be generated for inCount inputs  */
 {
-    int np = inCount * _upRate;
+    unsigned long np = inCount * (unsigned long) _upRate;
     int need = np / _downRate;
     if ((_t + _upRate * _xOffset) < (np % _downRate))
         need++;


Original issue reported on code.google.com by [email protected] on 20 Jun 2013 at 9:55

Q: Porting to scipy

Would it be alright if I port this code to scipy? I think it would be useful to 
have this functionality there. The site says that the code is BSD licensed, is 
that correct?

Original issue reported on code.google.com by [email protected] on 23 Feb 2015 at 4:26

Making upfirdn work in Python 3

Hi, I spent a few minutes to make upfirdn work on Python 3.  I haven't tested 
extensively yet, but the test() function passes for python 2.7.6 and 3.4.0 on 
Ubuntu 14.04.

Original issue reported on code.google.com by [email protected] on 23 Jun 2015 at 11:17

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.