Class: Audio::OGG::Decoder
- Inherits:
-
Object
- Object
- Audio::OGG::Decoder
- Defined in:
- lib/icanhasaudio/ogg/decoder.rb,
ext/icanhasaudio/audio_ogg_decoder.c
Instance Attribute Summary collapse
-
#bits ⇒ Object
Number of bits, 8 or 16.
-
#endian ⇒ Object
Endianness.
-
#raw ⇒ Object
Set to true for no WAV header.
-
#sign ⇒ Object
Signedness.
Instance Method Summary collapse
-
#decode(input, output) ⇒ Object
Decode
input
and write tooutput
. -
#initialize {|_self| ... } ⇒ Decoder
constructor
A new instance of Decoder.
Constructor Details
#initialize {|_self| ... } ⇒ Decoder
Returns a new instance of Decoder.
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
#bits ⇒ Object
Number of bits, 8 or 16
8 9 10 |
# File 'lib/icanhasaudio/ogg/decoder.rb', line 8 def bits @bits end |
#endian ⇒ Object
Endianness
11 12 13 |
# File 'lib/icanhasaudio/ogg/decoder.rb', line 11 def endian @endian end |
#raw ⇒ Object
Set to true for no WAV header
5 6 7 |
# File 'lib/icanhasaudio/ogg/decoder.rb', line 5 def raw @raw end |
#sign ⇒ Object
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 |