Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing a function to set bits per sample of a SignalSource and a bug in WaveFileHandler #54

Open
sangk54 opened this issue Dec 24, 2015 · 0 comments

Comments

@sangk54
Copy link

sangk54 commented Dec 24, 2015

  1. A SignalSource always returns getBitsPerSample = 64 bits. To save to wav file, bps is set to 16bit, I can't save to wave file with 8 bits per sample. I think that class SignalSource should have a property bps and its gettter, setter.
  2. A bug in function readHeaderAndChannels() of class WaveFileHandler
    short* data = new short[header.WaveSize/2];
    fs.read((char_)data, header.WaveSize);
    Ex header.WaveSize = 5, data was allocated with 4 bytes but filled with 5 bytes (from fs.read)
    delete [] data; can crash ( always crash in Visual C++ 2012 (win 64bit))
    Simple fix: short_ data = new short[header.WaveSize/2 + 1];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant