[id] = CopySample(source, dest)
source
and creates a copy of
it as sample dest
. The new sample is independent from the old one so you
could free the source sample after it has been cloned.
If you pass Nil as dest
, CopySample()
will return a handle to the new
sample to you. Otherwise the new sample will use the identifier specified
in dest
.
dest
CopySample(1, 10) FreeSample(1)The above code creates a new sample 10 which contains the same audio data as sample 1. Then it frees sample 1 because it is no longer needed.