summaryrefslogtreecommitdiffstats
path: root/WhisperNet/API/iAudioBuffer.cs
diff options
context:
space:
mode:
authorKonstantin <const@const.me>2023-02-03 12:52:05 +0100
committerKonstantin <const@const.me>2023-02-03 12:52:05 +0100
commit6238fc31c6a0a6004cfb6791a7bf85c829c8acc9 (patch)
tree7645adb3aea2422ebf35640906a52c395b37a5f1 /WhisperNet/API/iAudioBuffer.cs
parent2deddc6e541bc61f72e07f7cc82f91d7e117f619 (diff)
Minor, API documentation
Diffstat (limited to 'WhisperNet/API/iAudioBuffer.cs')
-rw-r--r--WhisperNet/API/iAudioBuffer.cs13
1 files changed, 7 insertions, 6 deletions
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
{
/// <summary>A buffer with a chunk of audio.</summary>
/// <remarks>Note the interface supports both marshaling directions.<br/>
- /// I have not tested, but you should be able to implement this interface in C#, to supply PCM audio data to the native code</remarks>
+ /// I have not tested, but you should be able to implement this interface in C#, to supply PCM audio data to the native code.</remarks>
[ComInterface( "013583aa-c9eb-42bc-83db-633c2c317051", eMarshalDirection.BothWays )]
public interface iAudioBuffer: IDisposable
{
- /// <summary>Count of samples in the buffer</summary>
+ /// <summary>Count of samples in the buffer, equal to ( length in seconds ) * 16000</summary>
int countSamples();
- /// <summary>Unmanaged pointer to the internal buffer containing single-channel FP32 samples.</summary>
+ /// <summary>Unmanaged pointer to the internal buffer with single-channel <c>float</c> PCM samples @ 16 kHz sample rate.</summary>
/// <remarks>If you implementing this interface in C# and your audio data is on the managed heap, use <see cref="GCHandle" /> to make sure it doesn't move.<br/>
/// Or better yet, move the data to unmanaged buffer allocated with <see cref="Marshal.AllocHGlobal(int)" /> or <see cref="Marshal.AllocCoTaskMem(int)" /> method.</remarks>
IntPtr getPcmMono();
- /// <summary>Unmanaged pointer to the internal buffer containing stereo FP32 samples.</summary>
- /// <remarks>When the buffer doesn’t have stereo data, the method gonna return <see cref="IntPtr.Zero" />.</remarks>
+ /// <summary>Unmanaged pointer to the internal buffer with interleaved stereo <c>float</c> PCM samples @ 16 kHz sample rate.</summary>
+ /// <remarks>When the buffer doesn’t have stereo data, the method should return <see cref="IntPtr.Zero" />.</remarks>
IntPtr getPcmStereo();
- /// <summary>Start time of the buffer, relative to the start of the media</summary>
+ /// <summary>Start time of the buffer, relative to the start of the media.</summary>
+ /// <remarks>The value is used to produce timestamps in <see cref="sSegment.time" /> and <see cref="sToken.time" /> fields.</remarks>
void getTime( out TimeSpan time );
}
} \ No newline at end of file