Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,7 @@ $RECYCLE.BIN/

# Windows shortcuts
*.lnk

#JetBrains Rider
.idea/
*.sln.iml
28 changes: 28 additions & 0 deletions MP3Sharp.Core.sln
Original file line number Diff line number Diff line change
@@ -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
29 changes: 29 additions & 0 deletions MP3Sharp.UnitTests/MP3Sharp.UnitTests.Core.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<RootNamespace>MP3Sharp.UnitTests</RootNamespace>
<OutputType>Library</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MP3Sharp\MP3Sharp.Core.csproj" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="sample.mp3" />
</ItemGroup>

</Project>
10 changes: 10 additions & 0 deletions MP3Sharp/MP3Sharp.Core.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

</Project>
6 changes: 3 additions & 3 deletions MP3Sharp/MP3Stream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public MP3Stream(Stream sourceStream, int chunkSize) {
/// <summary>
/// Gets the chunk size.
/// </summary>
internal int ChunkSize => BACK_STREAM_BYTE_COUNT_REP;
public int ChunkSize => BACK_STREAM_BYTE_COUNT_REP;

/// <summary>
/// Gets a value indicating whether the current stream supports reading.
Expand Down Expand Up @@ -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.
/// </summary>
internal short ChannelCount => _ChannelCountRep;
public short ChannelCount => _ChannelCountRep;

/// <summary>
/// Gets the PCM output format of this stream.
/// </summary>
internal SoundFormat Format => FormatRep;
public SoundFormat Format => FormatRep;

/// <summary>
/// Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
Expand Down