Skip to content

Instantly share code, notes, and snippets.

@acook
Created August 14, 2013 03:13
Show Gist options
  • Save acook/6227715 to your computer and use it in GitHub Desktop.
Save acook/6227715 to your computer and use it in GitHub Desktop.
#!/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}"
$ ./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