Comments (6)
I'll work on this issue, but I don't think I have permissions to assign it to myself.
from wavefile.
I committed changes to address this issue on my fork: https://github.com/jamestunnell/wavefile
You can pull in the changes if you think they take care of the issue (tests are there as well).
from wavefile.
The exact commit is jamestunnell@8e75345814
from wavefile.
Thanks for the quick response!
Took a look at the commit. Thanks for the well documented and easy to read tests. Only comment is around the test_exception_without_block
test. When not using a block, it's the client's responsibility to make sure the Writer
gets closed, which can be done using begin/ensure for example. The situation in this test of the header not being written could be resolved by closing the file in an ensure block. So it sort of seems like it's testing that if the client does the wrong thing, they get the wrong result.
What it ultimately seems to be testing is that if the file hasn't been closed yet, you won't be able to read data out of it. It could possibly be simplified by removing the begin/rescue and ZeroDivisionError
, and just reading the file before the Writer
is closed:
writer = Writer.new("#{OUTPUT_FOLDER}/exception_without_block.wav", format)
writer.write(Buffer.new([1, 2, 3, 4], format))
reader = Reader.new("#{OUTPUT_FOLDER}/exception_without_block.wav")
assert_equal(0, reader.samples_remaining)
from wavefile.
Yeah, I guess that test is a bit pointless. Not hard to take it out though!
from wavefile.
Awesome, thanks! I've merged in your commits, so closing the issue.
from wavefile.
Related Issues (20)
- Possible bug when no block is given to the writer? HOT 2
- No high-level duration info HOT 2
- Example here - https://github.com/jstrait/wavefile/wiki/WaveFile-Tutorial#copying-a-wave-file-to-different-format working correctly? HOT 5
- fyi: ruby-wavefile now packaged for Debian HOT 1
- support reading from a file or stream HOT 5
- Duration does not override equality HOT 2
- UnsupportedFormatError HOT 8
- Method to obtain markers/cue points HOT 6
- each_buffer causes ReaderClosedError HOT 3
- Reference for older methods HOT 4
- examples: how create reverse file? HOT 2
- Mix 2 wav files. HOT 2
- Rewind the IO object HOT 4
- Format Chunks With Extra Bytes at the End Sometimes Cause `InvalidFormatError` to be Raised HOT 1
- `Reader` instances can be created for WAVE_FORMAT_EXTENSIBLE files that have an incomplete/missing format chunk extension HOT 1
- Bufer from bytes & mulaw HOT 2
- WaveFile::Reader doesn't work with pipe IO HOT 2
- Sample Data Can't Be Read From a WAVE_FORMAT_EXTENSIBLE File With an Oversized Format Chunk Extension HOT 1
- How i can play file HOT 1
- Misleading error message if "fmt " chunk extension is too large to fit into chunk HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wavefile.