Skip to content

Commit

Permalink
isng chunk should not be required resolves naudio#150
Browse files Browse the repository at this point in the history
  • Loading branch information
markheath committed Jan 14, 2017
1 parent 4ea0c11 commit 5dbf714
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions NAudio/FileFormats/SoundFont/InfoChunk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public class InfoChunk
internal InfoChunk(RiffChunk chunk)
{
bool ifilPresent = false;
bool isngPresent = false;
bool INAMPresent = false;
if(chunk.ReadChunkID() != "INFO")
{
Expand All @@ -41,7 +40,6 @@ internal InfoChunk(RiffChunk chunk)
verSoundFont = (SFVersion) c.GetDataAsStructure(new SFVersionBuilder());
break;
case "isng":
isngPresent = true;
waveTableSoundEngine = c.GetDataAsString();
break;
case "INAM":
Expand Down Expand Up @@ -80,10 +78,7 @@ internal InfoChunk(RiffChunk chunk)
{
throw new InvalidDataException("Missing SoundFont version information");
}
if(!isngPresent)
{
throw new InvalidDataException("Missing wavetable sound engine information");
}
// issue #150 - it is valid for isng not to be present
if(!INAMPresent)
{
throw new InvalidDataException("Missing SoundFont name information");
Expand Down

0 comments on commit 5dbf714

Please sign in to comment.