crunker icon indicating copy to clipboard operation
crunker copied to clipboard

Duplication line?

Open vitaly-zdanevich opened this issue 6 years ago • 2 comments

https://github.com/jackedgson/crunker/blob/ecaf6f8400c492d0d5c5c4401acc692b1897f8b9/src/crunker.js#L153

vitaly-zdanevich avatar Nov 14 '18 18:11 vitaly-zdanevich

Hmmm, there was probably a reason for this, it's been a while since I wrote it. Feel free to fork and remove the second line and see if it makes a difference. Let me know your findings.

jaggad avatar Nov 14 '18 21:11 jaggad

The reason appears to be that you're duplicating a single channel (mono?) to get enough data to write a stereo channel wav file in your write_headers method.

So it's not a duplicate line that needs to be removed, but the actual interleaving itself is kind of pointless? (assuming mono plays audio on both Left and Right speakers/outputs). That said, the write_headers method is hardcoded to create stereo channel wav file... and the export method despite whatever type you provide afaik is enforcing the wav encoding(16 bit PCM) as that's not required if you were to save in a supported format like ogg, the formats supported natively by blob for audio are rather limited though(no mp3).

polarathene avatar Jan 23 '19 05:01 polarathene