Module: Awaaz::Extensions::Soundfile
- Extended by:
- FFI::Library
- Defined in:
- lib/awaaz/extensions/soundfile.rb
Overview
The Soundfile module provides Ruby bindings to the ‘libsndfile` C library using the FFI (Foreign Function Interface).
It allows reading audio file metadata and sample data directly from Ruby.
Defined Under Namespace
Classes: SF_INFO
Constant Summary collapse
- SFM_READ =
Open mode for reading sound files.
0x10
Instance Method Summary collapse
-
#sf_close ⇒ Integer
Closes an open audio file.
-
#sf_open ⇒ Object
Opens an audio file and returns a pointer to the file handle.
-
#sf_readf_float ⇒ Integer
Reads floating-point audio frames from an open file.
Instance Method Details
#sf_close ⇒ Integer
Closes an open audio file.
71 |
# File 'lib/awaaz/extensions/soundfile.rb', line 71 attach_function :sf_close, [:pointer], :int |
#sf_open ⇒ Object
Opens an audio file and returns a pointer to the file handle.
59 |
# File 'lib/awaaz/extensions/soundfile.rb', line 59 attach_function :sf_open, i[string int pointer], :pointer |
#sf_readf_float ⇒ Integer
Reads floating-point audio frames from an open file.
65 |
# File 'lib/awaaz/extensions/soundfile.rb', line 65 attach_function :sf_readf_float, i[pointer pointer long_long], :long_long |