mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Use TagLib instead of ManagedBass
This commit is contained in:
26
osu.Game/IO/FileAbstraction/StreamFileAbstraction.cs
Normal file
26
osu.Game/IO/FileAbstraction/StreamFileAbstraction.cs
Normal file
@ -0,0 +1,26 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.IO;
|
||||
|
||||
namespace osu.Game.IO.FileAbstraction
|
||||
{
|
||||
public class StreamFileAbstraction : TagLib.File.IFileAbstraction
|
||||
{
|
||||
public StreamFileAbstraction(string filename, Stream fileStream)
|
||||
{
|
||||
ReadStream = fileStream;
|
||||
Name = filename;
|
||||
}
|
||||
|
||||
public string Name { get; }
|
||||
|
||||
public Stream ReadStream { get; }
|
||||
public Stream WriteStream => ReadStream;
|
||||
|
||||
public void CloseStream(Stream aStream)
|
||||
{
|
||||
aStream.Position = 0;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user