Class: Rex::Proto::IAX2::Codecs::MuLaw

Inherits:
G711
  • Object
show all
Defined in:
lib/rex/proto/iax2/codecs/mulaw.rb

Constant Summary

Constants inherited from G711

G711::LOOKUP_ALAW2LIN16, G711::LOOKUP_LIN2ALAW, G711::LOOKUP_LIN2ULAW, G711::LOOKUP_ULAW2LIN16

Class Method Summary collapse

Class Method Details

.decode(buff) ⇒ Object


9
10
11
# File 'lib/rex/proto/iax2/codecs/mulaw.rb', line 9

def self.decode(buff)
  buff.unpack("C*").map{ |x| LOOKUP_ULAW2LIN16[x] }.pack('v*')
end