sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
WaveFile::Reader#read
Reads the specified number of sample frames from the wave file into a Buffer. Note that the Buffer will have
at most sample_frame_count sample frames, but could have less if the file doesn't have enough remaining.
sample_frame_count - The number of sample frames to read. Note that each sample frame includes a sample for
each channel.
Returns a Buffer containing sample_frame_count sample frames
Raises UnsupportedFormatError if file is in a format that can't be read by this gem
Raises EOFError if no samples could be read due to reaching the end of the fileEdit
git clone [email protected]:sonic-pi-net/sonic-pi.git
cd sonic-pi
open app/server/ruby/vendor/wavefile-0.8.1/lib/wavefile/reader.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-WaveFile--Reader-read-for-pr
# Commit to gitgit add app/server/ruby/vendor/wavefile-0.8.1/lib/wavefile/reader.rbgit commit -m "better docs for WaveFile::Reader#read"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-WaveFile--Reader-read-for-pr
hub pull-request
# Celebrate!