diff --git a/Konata.Codec/Audio/Codecs/SilkV3Codec.cs b/Konata.Codec/Audio/Codecs/SilkV3Codec.cs index 387c59f..83418e3 100644 --- a/Konata.Codec/Audio/Codecs/SilkV3Codec.cs +++ b/Konata.Codec/Audio/Codecs/SilkV3Codec.cs @@ -83,10 +83,10 @@ public override int Read(byte[] buffer, int offset, int count) Position = 0; } - // Catch native exceptions - catch + // Catch exceptions + catch (Exception e) { - throw new EncodeException("Thrown an exception while encoding silk."); + throw new EncodeException("Thrown an exception while encoding silk.", e); } // Cleanup @@ -165,10 +165,10 @@ public override int Read(byte[] buffer, int offset, int count) Position = 0; } - // Catch native exceptions - catch + // Catch exceptions + catch (Exception e) { - throw new EncodeException("Thrown an exception while decoding silk."); + throw new EncodeException("Thrown an exception while decoding silk.", e); } // Cleanup diff --git a/Konata.Codec/Audio/Codecs/VorbisCodec.cs b/Konata.Codec/Audio/Codecs/VorbisCodec.cs index a20ddfd..04e1e49 100644 --- a/Konata.Codec/Audio/Codecs/VorbisCodec.cs +++ b/Konata.Codec/Audio/Codecs/VorbisCodec.cs @@ -11,6 +11,9 @@ namespace Konata.Codec.Audio.Codecs; /// public class VorbisCodec { + /// + /// Vorbis decoder + /// public class Decoder : AudioStream { private readonly VorbisReader _stream; diff --git a/Konata.Codec/Audio/Codecs/WavCodec.cs b/Konata.Codec/Audio/Codecs/WavCodec.cs index 2ef457d..5097894 100644 --- a/Konata.Codec/Audio/Codecs/WavCodec.cs +++ b/Konata.Codec/Audio/Codecs/WavCodec.cs @@ -124,6 +124,7 @@ public Decoder(Stream file) internal override AudioInfo? GetAdaptiveOutput() => _output; + /// public override void Flush() => _stream.Flush(); diff --git a/Konata.Codec/Exceptions/DecodeException.cs b/Konata.Codec/Exceptions/DecodeException.cs index 6a9db39..1629534 100644 --- a/Konata.Codec/Exceptions/DecodeException.cs +++ b/Konata.Codec/Exceptions/DecodeException.cs @@ -11,8 +11,9 @@ public class DecodeException : Exception /// Decode exception /// /// - public DecodeException(string message) - : base(message) + /// + public DecodeException(string message, Exception inner = null) + : base(message, inner) { } diff --git a/Konata.Codec/Exceptions/EncodeException.cs b/Konata.Codec/Exceptions/EncodeException.cs index 16ff708..7279eef 100644 --- a/Konata.Codec/Exceptions/EncodeException.cs +++ b/Konata.Codec/Exceptions/EncodeException.cs @@ -11,8 +11,9 @@ public class EncodeException : Exception /// Encode exception /// /// - public EncodeException(string message) - : base(message) + /// + public EncodeException(string message, Exception inner = null) + : base(message, inner) { } }