-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NAudio plugin ready for release, I think!
- Loading branch information
1 parent
037d1b3
commit 68a3451
Showing
5 changed files
with
87 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
BenMakesGames.PlayPlayMini.NAudio/Services/NAudioFileLoader.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
using NAudio.Wave; | ||
|
||
namespace BenMakesGames.PlayPlayMini.NAudio.Services; | ||
|
||
public sealed class NAudioFileLoader | ||
{ | ||
private Func<string, WaveStream> Loader { get; } | ||
public string Extension { get; } | ||
|
||
public NAudioFileLoader(string extension, Func<string, WaveStream> loader) | ||
{ | ||
Loader = loader; | ||
Extension = extension.ToLower(); | ||
} | ||
|
||
public WaveStream Load(string path) => Loader(path); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters