Crocket::SyncDevice
Inherits Reference < Object
Constants
DEFAULT_PORT = Rocket::SYNC_DEFAULT_PORT
Constructors
Class methods
define_is_playing_callback
Sourcedefine_pause_callback
Sourcedefine_set_row_callback
SourceInstance methods
base
Sourcetcp_connect(hostname : String, port : UInt16 = DEFAULT_PORT) : Bool
Connects to the Rocket editor listening on hostname at port via TCP.
to_unsafe
to_unsafe returns the raw C pointer to this Rocket sync_device struct.
Useful for when you need to call the library functions directly.
For example:
device = Crocket::SyncDevice.new("sync")
callbacks = Crocket::Rocket::SyncCb.new(
pause: ->(d : Void*, flag : Int32) {},
# ...
)
# ...
loop do
row = get_current_row(some_audio_context)
Crocket::Rocket.sync_update(device, row.floor, pointerof(callbacks), nil)
end
update(row : Float) : Bool
Tells Rocket that we've moved to another row
Lazy shortcut for
device.update(row.floor.to_i)