IWaveSource.cs 1.6 KB

123456789101112131415161718192021222324252627282930
  1. namespace Bmp.Core.FFMpeg.CsCorePorts;
  2. /// <summary>
  3. /// Defines the base for all audio streams which provide raw byte data.
  4. /// </summary>
  5. /// <remarks>
  6. /// Compared to the <see cref="ISampleSource" />, the <see cref="IWaveSource" /> provides raw bytes instead of samples.
  7. /// That means that the <see cref="IAudioSource.Position" /> and the <see cref="IAudioSource.Position" /> properties are
  8. /// expressed in bytes.
  9. /// Also the <see cref="IReadableAudioSource{T}.Read" /> method provides samples instead of raw bytes.
  10. /// </remarks>
  11. public interface IWaveSource : IReadableAudioSource<byte>
  12. {
  13. /*/// <summary>
  14. /// Reads a sequence of bytes from the <see cref="IWaveSource" /> and advances the position within the stream by the
  15. /// number of bytes read.
  16. /// </summary>
  17. /// <param name="buffer">
  18. /// An array of bytes. When this method returns, the <paramref name="buffer" /> contains the specified
  19. /// byte array with the values between <paramref name="offset" /> and (<paramref name="offset" /> +
  20. /// <paramref name="count" /> - 1) replaced by the bytes read from the current source.
  21. /// </param>
  22. /// <param name="offset">
  23. /// The zero-based byte offset in the <paramref name="buffer" /> at which to begin storing the data
  24. /// read from the current stream.
  25. /// </param>
  26. /// <param name="count">The maximum number of bytes to read from the current source.</param>
  27. /// <returns>The total number of bytes read into the buffer.</returns>
  28. int Read(byte[] buffer, int offset, int count);*/
  29. }