sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
WaveFile::Duration#==
Public: Returns true if this Duration represents that same amount of time as other_duration. Two Duration instances will evaluate as == if they correspond to the same "stopwatch time". This means that two Durations constructed from a different number of sample frames or different sample rates can be considered equal if they correspond to the same amount of time. For example, a Duration from 44,100 sample frames at 44,100 samples/sec will be considered equal to a Duration from 22,050 sample frames at 22,050 samples/sec, because both correspond to 1 second of audio. Since the finest resolution of a duration is 1 millisecond, two Durations that represent different amounts of time but differ by less than 1 millisecond will be considered equal.
Edit
git clone [email protected]:sonic-pi-net/sonic-pi.git
cd sonic-pi
open app/server/ruby/vendor/wavefile-0.8.1/lib/wavefile/duration.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-WaveFile--Duration----for-pr
# Commit to gitgit add app/server/ruby/vendor/wavefile-0.8.1/lib/wavefile/duration.rbgit commit -m "better docs for WaveFile::Duration#=="
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-WaveFile--Duration----for-pr
hub pull-request
# Celebrate!