Class: Sndfile::Info
Overview
The Info class encapsulates the metdata about the audio contents.
Constant Summary
Constants included from Enums
Enums::Command, Enums::ENCODING_MASK, Enums::ENDIAN_MASK, Enums::Encoding, Enums::Endian, Enums::ErrorCode, Enums::FORMAT_MASK, Enums::FileMode, Enums::Format
Class Method Summary collapse
-
.from_sfinfo(sfinfo) ⇒ Object
:nodoc:.
Class Method Details
.from_sfinfo(sfinfo) ⇒ Object
:nodoc:
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/sndfile/info.rb', line 11 def self.from_sfinfo(sfinfo) new( :format => Format[sfinfo[:format] & FORMAT_MASK], :encoding => Encoding[sfinfo[:format] & ENCODING_MASK], :endian => Endian[sfinfo[:format] & ENDIAN_MASK], :frames => sfinfo[:frames], :samplerate => sfinfo[:samplerate], :channels => sfinfo[:channels] ) end |