summaryrefslogtreecommitdiff
path: root/apps/web/src/timeline/audio-separation
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/src/timeline/audio-separation')
-rw-r--r--apps/web/src/timeline/audio-separation/index.ts21
1 files changed, 3 insertions, 18 deletions
diff --git a/apps/web/src/timeline/audio-separation/index.ts b/apps/web/src/timeline/audio-separation/index.ts
index dd56df5f..6917378c 100644
--- a/apps/web/src/timeline/audio-separation/index.ts
+++ b/apps/web/src/timeline/audio-separation/index.ts
@@ -121,28 +121,13 @@ function cloneVolumeAnimations({
}: {
animations: ElementAnimations | undefined;
}): ElementAnimations | undefined {
- const volumeBinding = animations?.bindings.volume;
- if (!volumeBinding) {
- return undefined;
- }
-
- const subsetChannels = Object.fromEntries(
- volumeBinding.components.flatMap((component) => {
- const channel = animations?.channels[component.channelId];
- return channel ? [[component.channelId, channel] as const] : [];
- }),
- );
- if (Object.keys(subsetChannels).length === 0) {
+ const volumeData = animations?.volume;
+ if (!volumeData) {
return undefined;
}
return cloneAnimations({
- animations: {
- bindings: {
- volume: volumeBinding,
- },
- channels: subsetChannels,
- },
+ animations: { volume: volumeData },
shouldRegenerateKeyframeIds: true,
});
}