SaveSample -- save sample to disk (V5.0)
SaveSample(id, f$[, fmt, t])
This command saves the sample specified in
id to the file specified
f$. The optional argument
fmt specifies the format in which the
sample should be exported. Currently, only
#SMPFMT_WAVE is supported here.
This will save the sample in the RIFF WAVE format.
Starting with Hollywood 10.0,
SaveSample() accepts an optional table argument
that allows you to pass additional arguments to the function. The following
tags are currently supported by the optional table argument:
This tag allows you to specify one or more file adapters that
should be asked if they want to save the specified file. If
you use this tag, you must set it to a string containing the name(s)
of one or more adapter(s). Defaults to the adapter set using SetDefaultAdapter().
See Loaders and adapters for details. (V10.0)
This tag can be used to specify additional data that should be passed to loaders
and adapters. If you use this tag, you must set it to a table of key-value pairs
that contain the additional data that should be passed to plugins. See User tags for details. (V10.0)
- identifier of sample to save
- path to save location
- optional: format in which to export the sample (defaults to
- optional: table containing further options (see above) (V10.0)
@SAMPLE 1, "ouch.8svx"
The code above loads a sample in the IFF 8SVX format and saves it as
a RIFF WAVE sample.