Created
August 14, 2013 03:13
-
-
Save acook/6227715 to your computer and use it in GitHub Desktop.
This file contains 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("test.wav", "r") | |
puts "First position: #{file.pos}" | |
char = file.getc | |
puts "Got character: #{char}" | |
file.pos | |
puts "Final position: #{file.pos}" |
This file contains 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
$ ./readwav.rb | |
First position: 0 | |
Got character: R | |
Final position: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment