using ComLight;
using System.Runtime.InteropServices;
using Whisper.Internal;
namespace Whisper
{
/// Exposes a small subset of MS Media Foundation framework.
/// That framework is a part of Windows OS, since Vista.
///
[ComInterface( "fb9763a5-d77d-4b6e-aff8-f494813cebd8", eMarshalDirection.ToManaged ), CustomConventions( typeof( NativeLogger ) )]
public interface iMediaFoundation: IDisposable
{
/// Decode complete audio file into a new memory buffer.
///
/// Under the hood, the method asks MF to resample and convert audio into the suitable type for the Whisper model.
/// If the path is a video file, the method will decode the first audio track.
///
[RetValIndex( 2 )]
iAudioBuffer loadAudioFile( [MarshalAs( UnmanagedType.LPWStr )] string path, [MarshalAs( UnmanagedType.U1 )] bool stereo = false );
/// Create a reader to stream the audio file from disk
///
/// Under the hood, the method asks MF to resample and convert audio into the suitable type for the Whisper model.
/// If the path is a video file, the method will decode the first audio track.
///
[RetValIndex( 2 )]
iAudioReader openAudioFile( [MarshalAs( UnmanagedType.LPWStr )] string path, [MarshalAs( UnmanagedType.U1 )] bool stereo = false );
/// List capture devices
void listCaptureDevices( [MarshalAs( UnmanagedType.FunctionPtr )] pfnFoundCaptureDevices pfn, IntPtr pv );
/// Open audio capture device
[RetValIndex( 2 )]
iAudioCapture openCaptureDevice( [MarshalAs( UnmanagedType.LPWStr )] string endpoint, [In] ref sCaptureParams captureParams );
}
}