Class: Audio::OGG::Decoder

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Decoder.

Yields:

  • (_self)

Yield Parameters:



16
17
18
19
20
21
22
# File 'lib/icanhasaudio/ogg/decoder.rb', line 16

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



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

def bits
  @bits
end

#endianObject

Endianness



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

def endian
  @endian
end

#rawObject

Set to true for no WAV header



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

def raw
  @raw
end

#signObject

Signedness



14
15
16
# File 'lib/icanhasaudio/ogg/decoder.rb', line 14

def sign
  @sign
end

Instance Method Details

#decode(input, output) ⇒ Object

Decode input and write to output



26
27
28
# File 'lib/icanhasaudio/ogg/decoder.rb', line 26

def decode input, output
  native_decode(input, output)
end