Difference between revisions of "SoundData:copyFrom"
(Created page) |
m (Fix parameter) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
{{param|number|sourcestart|The first sample in the source SoundData to copy from.}} | {{param|number|sourcestart|The first sample in the source SoundData to copy from.}} | ||
{{param|number|samplecount|The total number of samples to copy.}} | {{param|number|samplecount|The total number of samples to copy.}} | ||
− | {{param|number| | + | {{param|number|deststart|The first sample in the destination SoundData to copy to.}} |
=== Returns === | === Returns === | ||
+ | Nothing. | ||
== Notes == | == Notes == | ||
Samples start from zero. If a SoundData has multiple channels, each sample contains data for all channels. | Samples start from zero. If a SoundData has multiple channels, each sample contains data for all channels. | ||
− | + | ||
+ | This function does not perform sample rate conversion. If the SoundDatas have different sample rate, the resulting audio may played slower or faster depending on the differences. | ||
== See Also == | == See Also == | ||
* [[parent::SoundData]] | * [[parent::SoundData]] |
Latest revision as of 03:36, 23 January 2025
Available since LÖVE 12.0 |
This function is not supported in earlier versions. |
Copies the specified section of the given SoundData into this one.
Function
Synopsis
SoundData:copyFrom( sourcedata, sourcestart, samplecount, deststart )
Arguments
SoundData sourcedata
- The SoundData to copy from.
number sourcestart
- The first sample in the source SoundData to copy from.
number samplecount
- The total number of samples to copy.
number deststart
- The first sample in the destination SoundData to copy to.
Returns
Nothing.
Notes
Samples start from zero. If a SoundData has multiple channels, each sample contains data for all channels.
This function does not perform sample rate conversion. If the SoundDatas have different sample rate, the resulting audio may played slower or faster depending on the differences.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info