Skip to content

Bump NVorbis version from 0.10.0 to 0.10.1#8

Closed
bert2 wants to merge 1 commit intonaudio:masterfrom
bert2:bugfix/bump-NVorbis-version
Closed

Bump NVorbis version from 0.10.0 to 0.10.1#8
bert2 wants to merge 1 commit intonaudio:masterfrom
bert2:bugfix/bump-NVorbis-version

Conversation

@bert2
Copy link
Copy Markdown

@bert2 bert2 commented Jul 10, 2020

This updates the NVorbis reference to the latest patch version.

Since NAudio.Vorbis 1.2.0 I'm getting IndexOutOfRangeExceptions from NVorbis through NAudio.Vorbis. I noticed that the latest NVorbis release has a newer patch version and includes a commit that fixes some index calculation.

I'm hoping that the NVorbis fix will also resolve my problems, but I didn't confirm it.

You can see the exceptions I'm running into in a Dependabot PR that upgrades my NAudio.Vorbis reference. The build fails when running integration tests against an OGG file:

X VeryShortDtmfTones [446ms]
  Error Message:
   System.IndexOutOfRangeException : Index was outside the bounds of the array.
  Stack Trace:
   at NVorbis.Ogg.PacketProvider.CreatePacket(Int32& pageIndex, Int32& packetIndex, Boolean advance, Int64 granulePos, Boolean isResync, Boolean isContinued, Int32 packetCount, Int32 pageOverhead)
   at NVorbis.Ogg.PacketProvider.GetNextPacket(Int32& pageIndex, Int32& packetIndex)
   at NVorbis.Ogg.PacketProvider.GetNextPacket()
   at NVorbis.StreamDecoder.DecodeNextPacket(Int32& packetStartindex, Int32& packetValidLength, Int32& packetTotalLength, Boolean& isEndOfStream, Nullable`1& samplePosition, Int32& bitsRead, Int32& bitsRemaining, Int32& containerOverheadBits)
   at NVorbis.StreamDecoder.ReadNextPacket(Int32 bufferedSamples, Nullable`1& samplePosition)
   at NVorbis.StreamDecoder.Read(Single[] buffer, Int32 offset, Int32 count)
   at NAudio.Vorbis.VorbisSampleProvider.Read(Single[] buffer, Int32 offset, Int32 count)
   at NAudio.Vorbis.VorbisWaveReader.Read(Single[] buffer, Int32 offset, Int32 count)
   at NAudio.Vorbis.VorbisWaveReader.Read(Byte[] buffer, Int32 offset, Int32 count)
   at NAudio.Wave.SampleProviders.WaveToSampleProvider.Read(Single[] buffer, Int32 offset, Int32 count)
   at DtmfDetection.NAudio.MonoSampleProvider.Read(Single[] buffer, Int32 offset, Int32 count) in C:\projects\dtmf-detection\src\DtmfDetection.NAudio\MonoSampleProvider.cs:line 38
   at NAudio.Wave.SampleProviders.WdlResamplingSampleProvider.Read(Single[] buffer, Int32 offset, Int32 count)
   at DtmfDetection.NAudio.AudioFile.Read(Single[] buffer, Int32 count) in C:\projects\dtmf-detection\src\DtmfDetection.NAudio\AudioFile.cs:line 35
   at DtmfDetection.Analyzer.AnalyzeNextBlock() in C:\projects\dtmf-detection\src\DtmfDetection\Analyzer.cs:line 55
   at DtmfDetection.NAudio.WaveStreamExt.DtmfChanges(WaveStream waveStream, Boolean forceMono, Nullable`1 config) in C:\projects\dtmf-detection\src\DtmfDetection.NAudio\WaveStreamExt.cs:line 21
   at Integration.AudioFileTests.VeryShortDtmfTones() in C:\projects\dtmf-detection\test\integration\AudioFileTests.cs:line 81

@bert2
Copy link
Copy Markdown
Author

bert2 commented Jul 11, 2020

Unfortunately bumping the version will not solve my problem. There seems to be another bug in NVorbis. I created a bug report there: NVorbis/NVorbis#6

@bert2
Copy link
Copy Markdown
Author

bert2 commented Jul 18, 2020

Closing this, because a bump makes more sense when NVorbis/NVorbis#6 is fixed.

@bert2 bert2 closed this Jul 18, 2020
@bert2 bert2 deleted the bugfix/bump-NVorbis-version branch July 18, 2020 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant