saveRecBuf method
Future<BufRec>
saveRecBuf({
- AudioEncoding encoding = AudioEncoding.wav,
- SampleFormat? sampleFormat,
- int? channelCount,
- int? sampleRate,
Starts recording into in-RAM buffer. After the recording is stopped, it can be directly fed into Engine::loadSound.
Parameters directly influence the resulting buffer size. If any are absent, they take values from the device, which is a bit faster.
encoding - currently only WAV is supported, so there's no need in this parameter.
sampleFormat - the amount of different amplitude levels of the data.
channelCount - must be in range 1..254 inclusive.
sampleRate - controls sound frequencies that can be properly captured in a recording. Must be in range 1000..384000 inclusive.
Implementation
Future<BufRec> saveRecBuf({
AudioEncoding encoding = AudioEncoding.wav,
SampleFormat? sampleFormat,
int? channelCount,
int? sampleRate,
}) =>
_saveRec(
BufRec._,
encoding: encoding,
sampleFormat: sampleFormat,
channelCount: channelCount,
sampleRate: sampleRate,
);