mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:47:35 +00:00
AK: Move Stream
and SeekableStream
from LibCore
`Stream` will be qualified as `AK::Stream` until we remove the `Core::Stream` namespace. `IODevice` now reuses the `SeekMode` that is defined by `SeekableStream`, since defining its own would require us to qualify it with `AK::SeekMode` everywhere.
This commit is contained in:
parent
5f2ea31816
commit
8464da1439
96 changed files with 620 additions and 586 deletions
|
@ -29,7 +29,7 @@ static constexpr unsigned const WAVE_FORMAT_EXTENSIBLE = 0xFFFE; // Determined b
|
|||
// Parses and reads audio data from a WAV file.
|
||||
class WavLoaderPlugin : public LoaderPlugin {
|
||||
public:
|
||||
explicit WavLoaderPlugin(NonnullOwnPtr<Core::Stream::SeekableStream> stream);
|
||||
explicit WavLoaderPlugin(NonnullOwnPtr<SeekableStream> stream);
|
||||
static Result<NonnullOwnPtr<WavLoaderPlugin>, LoaderError> create(StringView path);
|
||||
static Result<NonnullOwnPtr<WavLoaderPlugin>, LoaderError> create(Bytes buffer);
|
||||
|
||||
|
@ -55,7 +55,7 @@ private:
|
|||
|
||||
LoaderSamples samples_from_pcm_data(Bytes const& data, size_t samples_to_read) const;
|
||||
template<typename SampleReader>
|
||||
MaybeLoaderError read_samples_from_stream(Core::Stream::Stream& stream, SampleReader read_sample, FixedArray<Sample>& samples) const;
|
||||
MaybeLoaderError read_samples_from_stream(AK::Stream& stream, SampleReader read_sample, FixedArray<Sample>& samples) const;
|
||||
|
||||
u32 m_sample_rate { 0 };
|
||||
u16 m_num_channels { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue