[id] = CopySample(source, dest[, table])
source and creates a copy of
it as sample dest. The new sample is independent of 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.
Starting with Hollywood 11 this function accepts a new optional table argument that accepts the following tags:
Hardware:False to create a software sample. Software samples are more
efficient because they are completely independent of the audio hardware because
they will never be played. Defaults to True. (V11.0)
destCopySample(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.