Description
The SampleFrameSize
property of the SoundFile
class represents the size of one sample frame in the audio file. This size is typically calculated as the product of the sample size and the number of channels, but it can vary depending on the audio format.
Usage
Use the SampleFrameSize
property to determine the size of a single sample frame in bytes. This information is useful when processing audio data, as it allows you to understand how much data is contained in each frame of audio.
Example
// Example of accessing the SampleFrameSize property
SoundFile soundFile = SoundFile.Load("path/to/soundfile.wav");
int frameSize = soundFile.SampleFrameSize;
// Output the sample frame size
// Note: Replace with appropriate logging or handling
// e.g., Log.Info($"Sample Frame Size: {frameSize}");