From 47c84b5adc605a83e4226ae90771b5311c7a6160 Mon Sep 17 00:00:00 2001 From: Trevor D'Arcy-Evans Date: Sun, 21 Aug 2022 16:34:28 +0100 Subject: [PATCH 1/3] - support JetBrains Rider --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index d44002e..5bf8d1c 100644 --- a/.gitignore +++ b/.gitignore @@ -231,3 +231,7 @@ $RECYCLE.BIN/ # Windows shortcuts *.lnk + +#JetBrains Rider +.idea/ +*.sln.iml From 74fde693f7f64071ad173503d5fda76bbc5b33b6 Mon Sep 17 00:00:00 2001 From: Trevor D'Arcy-Evans Date: Sun, 21 Aug 2022 16:37:16 +0100 Subject: [PATCH 2/3] - make public to expose to unit tests --- MP3Sharp/MP3Stream.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MP3Sharp/MP3Stream.cs b/MP3Sharp/MP3Stream.cs index fa9bd51..34e3af0 100644 --- a/MP3Sharp/MP3Stream.cs +++ b/MP3Sharp/MP3Stream.cs @@ -86,7 +86,7 @@ public MP3Stream(Stream sourceStream, int chunkSize) { /// /// Gets the chunk size. /// - internal int ChunkSize => BACK_STREAM_BYTE_COUNT_REP; + public int ChunkSize => BACK_STREAM_BYTE_COUNT_REP; /// /// Gets a value indicating whether the current stream supports reading. @@ -135,12 +135,12 @@ public override long Position { /// Gets the number of channels available in the audio being decoded. Updated every call to Read() or DecodeFrames(), /// to reflect the most recent header information from the MP3 Stream. /// - internal short ChannelCount => _ChannelCountRep; + public short ChannelCount => _ChannelCountRep; /// /// Gets the PCM output format of this stream. /// - internal SoundFormat Format => FormatRep; + public SoundFormat Format => FormatRep; /// /// Clears all buffers for this stream and causes any buffered data to be written to the underlying device. From 7c0ab98512b9173070eb5dc7f154c24e69726dc6 Mon Sep 17 00:00:00 2001 From: Trevor D'Arcy-Evans Date: Sun, 21 Aug 2022 16:37:41 +0100 Subject: [PATCH 3/3] - .NET Core solution + projects --- MP3Sharp.Core.sln | 28 ++++++++++++++++++ .../MP3Sharp.UnitTests.Core.csproj | 29 +++++++++++++++++++ MP3Sharp/MP3Sharp.Core.csproj | 10 +++++++ 3 files changed, 67 insertions(+) create mode 100644 MP3Sharp.Core.sln create mode 100644 MP3Sharp.UnitTests/MP3Sharp.UnitTests.Core.csproj create mode 100644 MP3Sharp/MP3Sharp.Core.csproj diff --git a/MP3Sharp.Core.sln b/MP3Sharp.Core.sln new file mode 100644 index 0000000..0d352e8 --- /dev/null +++ b/MP3Sharp.Core.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MP3Sharp.Core", "MP3Sharp\MP3Sharp.Core.csproj", "{80C9EF59-1536-45F5-9597-83B24611E906}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MP3Sharp.UnitTests.Core", "MP3Sharp.UnitTests\MP3Sharp.UnitTests.Core.csproj", "{CBD8FA09-D90F-4B0A-B4AB-8D605210E00A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {80C9EF59-1536-45F5-9597-83B24611E906}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {80C9EF59-1536-45F5-9597-83B24611E906}.Debug|Any CPU.Build.0 = Debug|Any CPU + {80C9EF59-1536-45F5-9597-83B24611E906}.Release|Any CPU.ActiveCfg = Release|Any CPU + {80C9EF59-1536-45F5-9597-83B24611E906}.Release|Any CPU.Build.0 = Release|Any CPU + {CBD8FA09-D90F-4B0A-B4AB-8D605210E00A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CBD8FA09-D90F-4B0A-B4AB-8D605210E00A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CBD8FA09-D90F-4B0A-B4AB-8D605210E00A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CBD8FA09-D90F-4B0A-B4AB-8D605210E00A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/MP3Sharp.UnitTests/MP3Sharp.UnitTests.Core.csproj b/MP3Sharp.UnitTests/MP3Sharp.UnitTests.Core.csproj new file mode 100644 index 0000000..07385aa --- /dev/null +++ b/MP3Sharp.UnitTests/MP3Sharp.UnitTests.Core.csproj @@ -0,0 +1,29 @@ + + + + net6.0 + enable + enable + + false + false + MP3Sharp.UnitTests + Library + + + + + + + + + + + + + + + + + + diff --git a/MP3Sharp/MP3Sharp.Core.csproj b/MP3Sharp/MP3Sharp.Core.csproj new file mode 100644 index 0000000..053a3ac --- /dev/null +++ b/MP3Sharp/MP3Sharp.Core.csproj @@ -0,0 +1,10 @@ + + + + net6.0 + enable + enable + false + + +