mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-15 02:29:10 +01:00
20 lines
No EOL
576 B
C#
20 lines
No EOL
576 B
C#
using System;
|
|
using System.IO;
|
|
using Microsoft.Xna.Framework.Media;
|
|
|
|
namespace MLEM.Data.Content {
|
|
/// <inheritdoc />
|
|
public class SongReader : RawContentReader<Song> {
|
|
|
|
/// <inheritdoc />
|
|
protected override Song Read(RawContentManager manager, string assetPath, Stream stream, Song existing) {
|
|
return Song.FromUri(Path.GetFileNameWithoutExtension(assetPath), new Uri(assetPath));
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override string[] GetFileExtensions() {
|
|
return new[] {"ogg", "wav", "mp3"};
|
|
}
|
|
|
|
}
|
|
} |