Class: FFI::PortAudio::Stream
- Inherits:
-
Object
- Object
- FFI::PortAudio::Stream
- Includes:
- FFI::PortAudio
- Defined in:
- lib/ffi-portaudio/stream.rb
Constant Summary
Constants included from FFI::PortAudio
Instance Method Summary collapse
- #close ⇒ Object
- #open(input, output, freq, frames = API::FramesPerBufferUnspecified, flags = API::NoFlag, userdata = nil) ⇒ Object
- #process(input, output, frameCount, timeInfo, statusFlags, userData) ⇒ Object
- #start ⇒ Object
Instance Method Details
#close ⇒ Object
16 17 18 |
# File 'lib/ffi-portaudio/stream.rb', line 16 def close API.Pa_CloseStream(@stream.read_pointer) end |
#open(input, output, freq, frames = API::FramesPerBufferUnspecified, flags = API::NoFlag, userdata = nil) ⇒ Object
4 5 6 7 8 |
# File 'lib/ffi-portaudio/stream.rb', line 4 def open(input, output, freq, frames=API::FramesPerBufferUnspecified, flags=API::NoFlag, userdata=nil) @input, @output, @freq, @frames, @flags, @userdata = input, output, freq, frames, flags, userdata @stream = FFI::Buffer.new :pointer API.Pa_OpenStream(@stream, @input, @output, @freq, @frames, @flags, @method = method(:process), @userdata) end |
#process(input, output, frameCount, timeInfo, statusFlags, userData) ⇒ Object
10 |
# File 'lib/ffi-portaudio/stream.rb', line 10 def process(input, output, frameCount, timeInfo, statusFlags, userData);end |
#start ⇒ Object
12 13 14 |
# File 'lib/ffi-portaudio/stream.rb', line 12 def start API.Pa_StartStream @stream.read_pointer end |