From 6238fc31c6a0a6004cfb6791a7bf85c829c8acc9 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Fri, 3 Feb 2023 12:52:05 +0100 Subject: Minor, API documentation --- WhisperNet/API/iAudioBuffer.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'WhisperNet/API/iAudioBuffer.cs') diff --git a/WhisperNet/API/iAudioBuffer.cs b/WhisperNet/API/iAudioBuffer.cs index 1b35621..c4e86b9 100644 --- a/WhisperNet/API/iAudioBuffer.cs +++ b/WhisperNet/API/iAudioBuffer.cs @@ -5,23 +5,24 @@ namespace Whisper { /// A buffer with a chunk of audio. /// Note the interface supports both marshaling directions.
- /// I have not tested, but you should be able to implement this interface in C#, to supply PCM audio data to the native code
+ /// I have not tested, but you should be able to implement this interface in C#, to supply PCM audio data to the native code. [ComInterface( "013583aa-c9eb-42bc-83db-633c2c317051", eMarshalDirection.BothWays )] public interface iAudioBuffer: IDisposable { - /// Count of samples in the buffer + /// Count of samples in the buffer, equal to ( length in seconds ) * 16000 int countSamples(); - /// Unmanaged pointer to the internal buffer containing single-channel FP32 samples. + /// Unmanaged pointer to the internal buffer with single-channel float PCM samples @ 16 kHz sample rate. /// If you implementing this interface in C# and your audio data is on the managed heap, use to make sure it doesn't move.
/// Or better yet, move the data to unmanaged buffer allocated with or method.
IntPtr getPcmMono(); - /// Unmanaged pointer to the internal buffer containing stereo FP32 samples. - /// When the buffer doesn’t have stereo data, the method gonna return . + /// Unmanaged pointer to the internal buffer with interleaved stereo float PCM samples @ 16 kHz sample rate. + /// When the buffer doesn’t have stereo data, the method should return . IntPtr getPcmStereo(); - /// Start time of the buffer, relative to the start of the media + /// Start time of the buffer, relative to the start of the media. + /// The value is used to produce timestamps in and fields. void getTime( out TimeSpan time ); } } \ No newline at end of file -- cgit v1.2.3