sirtom67 / upfirdn Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/upfirdn
License: BSD 3-Clause "New" or "Revised" License
Automatically exported from code.google.com/p/upfirdn
License: BSD 3-Clause "New" or "Revised" License
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
[deleted issue]
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
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:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.