Exception: SRC::SRCError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ruby-libsamplerate/src_error.rb

Class Method Summary collapse

Class Method Details

.from_int(code) ⇒ Object



4
5
6
7
# File 'lib/ruby-libsamplerate/src_error.rb', line 4

def self.from_int(code)
  strerror = SRC.src_strerror code
  SRCError.new strerror.get_string 0
end

.from_pointer(ptr) ⇒ Object



9
10
11
# File 'lib/ruby-libsamplerate/src_error.rb', line 9

def self.from_pointer(ptr)
  self.from_int ptr.read_int
end