Module: Groove::Loudness
- Extended by:
- FFI::Library
- Defined in:
- lib/groove/loudness.rb
Defined Under Namespace
Classes: GrooveLoudnessDetector, GrooveLoudnessDetectorInfo
Class Method Summary collapse
- .attach_function(name, *_) ⇒ Object
-
.loudness_detector_attach(detector, playlist) ⇒ Integer
once you attach, you must detach before destroying the playlist.
-
.loudness_detector_create ⇒ GrooveLoudnessDetector
(Not documented).
-
.loudness_detector_destroy(detector) ⇒ nil
(Not documented).
-
.loudness_detector_detach(detector) ⇒ Integer
(Not documented).
-
.loudness_detector_info_get(detector, info, block) ⇒ Integer
returns < 0 on error, 0 on aborted (block=1) or no info ready (block=0), 1 on info returned.
-
.loudness_detector_info_peek(detector, block) ⇒ Integer
returns < 0 on error, 0 on no info ready, 1 on info ready if block is 1, block until info is ready.
-
.loudness_detector_position(detector, item, seconds) ⇒ nil
get the position of the detect head both the current playlist item and the position in seconds in the playlist item are given.
Class Method Details
.attach_function(name, *_) ⇒ Object
9 10 11 12 13 |
# File 'lib/groove/loudness.rb', line 9 def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end |
.loudness_detector_attach(detector, playlist) ⇒ Integer
once you attach, you must detach before destroying the playlist
89 |
# File 'lib/groove/loudness.rb', line 89 attach_function :loudness_detector_attach, :groove_loudness_detector_attach, [GrooveLoudnessDetector, :pointer], :int |
.loudness_detector_create ⇒ GrooveLoudnessDetector
(Not documented)
72 |
# File 'lib/groove/loudness.rb', line 72 attach_function :loudness_detector_create, :groove_loudness_detector_create, [], GrooveLoudnessDetector |
.loudness_detector_destroy(detector) ⇒ nil
(Not documented)
80 |
# File 'lib/groove/loudness.rb', line 80 attach_function :loudness_detector_destroy, :groove_loudness_detector_destroy, [GrooveLoudnessDetector], :void |
.loudness_detector_detach(detector) ⇒ Integer
(Not documented)
97 |
# File 'lib/groove/loudness.rb', line 97 attach_function :loudness_detector_detach, :groove_loudness_detector_detach, [GrooveLoudnessDetector], :int |
.loudness_detector_info_get(detector, info, block) ⇒ Integer
returns < 0 on error, 0 on aborted (block=1) or no info ready (block=0), 1 on info returned
108 |
# File 'lib/groove/loudness.rb', line 108 attach_function :loudness_detector_info_get, :groove_loudness_detector_info_get, [GrooveLoudnessDetector, GrooveLoudnessDetectorInfo, :int], :int |
.loudness_detector_info_peek(detector, block) ⇒ Integer
returns < 0 on error, 0 on no info ready, 1 on info ready if block is 1, block until info is ready
118 |
# File 'lib/groove/loudness.rb', line 118 attach_function :loudness_detector_info_peek, :groove_loudness_detector_info_peek, [GrooveLoudnessDetector, :int], :int |
.loudness_detector_position(detector, item, seconds) ⇒ nil
get the position of the detect head both the current playlist item and the position in seconds in the playlist item are given. item will be set to NULL if the playlist is empty you may pass NULL for item or seconds
131 |
# File 'lib/groove/loudness.rb', line 131 attach_function :loudness_detector_position, :groove_loudness_detector_position, [GrooveLoudnessDetector, :pointer, :pointer], :void |