Class: Audio::OGG::Decoder

Inherits:
Object
  • Object
show all
Defined in:
ext/icanhasaudio.c,
lib/icanhasaudio/ogg.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Decoder

Returns a new instance of Decoder.

Yields:

  • (_self)

Yield Parameters:



14
15
16
17
18
19
20
# File 'lib/icanhasaudio/ogg.rb', line 14

def initialize
  @raw    = false
  @bits   = 16
  @endian = 0
  @sign   = 1
  yield self if block_given?
end

Instance Attribute Details

#bitsObject

Number of bits, 8 or 16



6
7
8
# File 'lib/icanhasaudio/ogg.rb', line 6

def bits
  @bits
end

#endianObject

Endianness



9
10
11
# File 'lib/icanhasaudio/ogg.rb', line 9

def endian
  @endian
end

#rawObject

Set to true for no WAV header



3
4
5
# File 'lib/icanhasaudio/ogg.rb', line 3

def raw
  @raw
end

#signObject

Signedness



12
13
14
# File 'lib/icanhasaudio/ogg.rb', line 12

def sign
  @sign
end

Instance Method Details

#decode(input_io, output_io) ⇒ Object

Decode the input IO and write it to the output IO.



33
# File 'ext/icanhasaudio.c', line 33

VALUE method_ogg_decode(VALUE self, VALUE infile, VALUE outf);