ladybird/Libraries/LibMedia/Forward.h
Zaggy1024 28f670f09f LibMedia: Implement audio time stretching with WSOLA
The algorithm is ported over from Chromium's, which produces very good
results for speech, while being not objectionable for music, especially
in the background.

Other algorithms were tested.

Phase vocoders:
- Bungee
- Signalsmith Stretch
- pvdoneright
All three of these exhibited the usual phase shifting artifacts,
causing speech to sound slightly shifted into the high end. Speech is
the main thing we want to optimize for, so these aren't ideal.

Sonic (TD-PSOLA) performs better than WSOLA for speech, especially at
rates higher than 2x, but makes background sounds/music garbled and
unpleasant. It is still worth considering for speech clarity, and could
be added as an optional feature.
2026-06-06 19:58:17 -05:00

38 lines
774 B
C++

/*
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
* Copyright (c) 2025, Gregory Bertilson <gregory@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
namespace Media {
class AudioDecoder;
class AudioMixer;
class AudioPlaybackSink;
class AudioProducer;
class AudioSink;
class CodedFrame;
class ContainerNavigator;
class DecodedAudioProducer;
class DecodedVideoProducer;
class DecoderError;
class Demuxer;
class DisplayingVideoSink;
class FrameQueueItem;
class IncrementallyPopulatedStream;
class MediaStream;
class MediaStreamCursor;
class MediaTimeProvider;
class PlaybackManager;
class ReadonlyBytesCursor;
class AudioTimeStretchProcessor;
class Track;
class VideoDecoder;
class VideoFrame;
class VideoProducer;
class VideoSink;
}