AudioBuffer   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm

Implementation

;; copy audiobuffer
(bind-func AudioBuffer
  (lambda (in:AudioBuffer*)
    (let ((size (* (AudioBuffer_frames in) (AudioBuffer_channels in)))
          (dat:SAMPLE* (alloc size))
          (olddat:SAMPLE* (AudioBuffer_data in)))
      (memcpy (cast dat) (cast olddat) (* size 4))
      (AudioBuffer_z
        (AudioBuffer_filepath in)
        (AudioBuffer_playhead in)
        (AudioBuffer_frames in)
        (AudioBuffer_channels in)
        dat
        (AudioBuffer_samplerate in)
        (AudioBuffer_loop_start in)
        (AudioBuffer_loop_frames in)
        (AudioBuffer_root_pitch in)
        (AudioBuffer_phase in)))))


Back to Index

Similar Entries