public
Description: I am in ur computar, encodin' and decodin' ur MP3z.
Homepage: http://icanhasaudio.com/
Clone URL: git://github.com/aaronp/icanhasaudio.git
Search Repo:
aaronp (author)
Sun May 11 15:45:15 -0700 2008
commit  5d25cea1f3419912e66b3eea69dd3cb30e4c92aa
tree    cda805c587467895d1a5534f6edf4bbdd24d6c8c
parent  423240a40bd838d85c0bc10e8056d22a978e454c
icanhasaudio / lib / icanhasaudio / mpeg.rb
100644 25 lines (19 sloc) 0.394 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'icanhasaudio/mpeg/encoder'
 
class Audio::MPEG::Decoder
  attr_reader :stereo, :samplerate, :bitrate, :mode, :mode_ext, :framesize
 
  # Number of bits, 8 or 16
  attr_accessor :bits
 
  def initialize
    @bits = 16
    yield self if block_given?
  end
 
  private
  def attempt_rewind(outf)
    begin
      outf.seek(0, IO::SEEK_SET)
      true
    rescue
      false
    end
  end
end