Method: FMOD::Sound#add_syncpoint

Defined in:
lib/fmod/sound.rb

#add_syncpoint(name, offset, unit = TimeUnit::MS) ⇒ Pointer

Adds a sync point at a specific time within the sound. These points can be user generated or can come from a wav file with embedded markers.

Parameters:

  • name (String)

    A name character string to be stored with the sync point.

  • offset (Integer)

    Offset to add the callback sync-point for a sound.

  • unit (Integer) (defaults to: TimeUnit::MS)

    Offset type to describe the offset provided. @see TimeUnit

Returns:

  • (Pointer)

    The sync point handle.



254
255
256
257
258
# File 'lib/fmod/sound.rb', line 254

def add_syncpoint(name, offset, unit = TimeUnit::MS)
  sync = int_ptr
  FMOD.invoke(:Sound_AddSyncPoint, self, offset, unit, name, sync)
  Pointer.new(sync.unpack1('J'))
end