Created
September 12, 2020 15:46
-
-
Save mcandre/f268ad2bd1fbc69548e57e988033d88e to your computer and use it in GitHub Desktop.
bit manip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
file = File.new('/tmp/default.pcm.dat', 'rb') | |
while bytes = file.read(4) do | |
puts bytes.unpack('l>')[0] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment