IAudioSource.cs 986 B

1234567891011121314151617181920212223242526272829
  1. namespace Bmp.Core.FFMpeg.CsCorePorts;
  2. /// <summary>
  3. /// Defines the base for all audio streams.
  4. /// </summary>
  5. public interface IAudioSource : IDisposable
  6. {
  7. /// <summary>
  8. /// Gets a value indicating whether the <see cref="IAudioSource" /> supports seeking.
  9. /// </summary>
  10. bool CanSeek { get; }
  11. /// <summary>
  12. /// Gets the <see cref="WaveFormat" /> of the waveform-audio data.
  13. /// </summary>
  14. WaveFormat WaveFormat { get; }
  15. /// <summary>
  16. /// Gets or sets the current position. The unit of this property depends on the implementation of this interface. Some
  17. /// implementations may not support this property.
  18. /// </summary>
  19. long Position { get; set; }
  20. /// <summary>
  21. /// Gets the length of the waveform-audio data. The unit of this property depends on the implementation of this
  22. /// interface. Some implementations may not support this property.
  23. /// </summary>
  24. long Length { get; }
  25. }