Giter VIP home page Giter VIP logo

Comments (4)

mgeier avatar mgeier commented on July 19, 2024

Apart from this, there also some formal problems:

$ pep8 test_pysoundfile.py 
test_pysoundfile.py:7:1: E302 expected 2 blank lines, found 1
test_pysoundfile.py:14:80: E501 line too long (84 > 79 characters)
test_pysoundfile.py:39:80: E501 line too long (83 > 79 characters)
test_pysoundfile.py:45:80: E501 line too long (85 > 79 characters)
test_pysoundfile.py:46:80: E501 line too long (84 > 79 characters)
test_pysoundfile.py:129:80: E501 line too long (81 > 79 characters)
test_pysoundfile.py:145:33: E231 missing whitespace after ','
test_pysoundfile.py:160:80: E501 line too long (84 > 79 characters)
test_pysoundfile.py:229:80: E501 line too long (80 > 79 characters)
test_pysoundfile.py:235:80: E501 line too long (84 > 79 characters)
test_pysoundfile.py:265:80: E501 line too long (85 > 79 characters)
test_pysoundfile.py:271:49: E231 missing whitespace after ','
test_pysoundfile.py:272:46: E231 missing whitespace after ','
test_pysoundfile.py:275:80: E501 line too long (94 > 79 characters)
test_pysoundfile.py:290:80: E501 line too long (84 > 79 characters)
test_pysoundfile.py:297:1: E302 expected 2 blank lines, found 1
test_pysoundfile.py:301:33: E231 missing whitespace after ','
test_pysoundfile.py:311:37: E231 missing whitespace after ','
test_pysoundfile.py:316:32: E231 missing whitespace after ','
test_pysoundfile.py:324:33: E231 missing whitespace after ','
test_pysoundfile.py:324:47: E261 at least two spaces before inline comment
test_pysoundfile.py:335:33: E231 missing whitespace after ','

from python-soundfile.

bastibe avatar bastibe commented on July 19, 2024

These are very valid points. Thank you!

from python-soundfile.

mgeier avatar mgeier commented on July 19, 2024

I think the tests about precision are not really necessary because they only test libsndfile.
I think it would be better to check for exact equality without the PCM <--> float conversion.

So either make a float test file and check with float32/float64 or make a PCM test file and test with int16/int32.
Or both.

It would be probably best to make a floating point test file with values which are accurately representable in both decimal and binary.
Something like [1.0, 0.5, 0.0, -0.5, -1.0], probably?
In stereo this could be [[1.0, -1.0], [0.5, -0.5], [0.0, 0.0], [-0.5, 0.5], [-1.0, 1.0]].
I guess 5 frames would be enough for most test cases.

from python-soundfile.

bastibe avatar bastibe commented on July 19, 2024

I am closing this issue. Discussion continues in #48 .

from python-soundfile.

Related Issues (20)

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.