<< Click to display table of contents >> GetListOfAvailableSampleRates Procedure |
Fills AList with audio sample rates acceptable for the Codec.
Unit [VCL and LCL] MRVFFMpegLists;
Unit [FMX] fmxMRVFFMpegLists;
procedure GetListOfAvailableSampleRates(Codec: TRVAudioCodec;
SampleFormat: TRVSampleFormat; AList : TStrings);
Sample rate is a number of audio samples played in 1 second.
This function works only if FFmpeg is available. Otherwise, it simply clears AList.
For most codecs, AList is filled basing on Codec parameter, SampleFormat parameter is ignored.
Only for Codec = rvacWAV, SampleFormat is used (because RVMedia chooses different WAV codec depending on sample format).
Each added item has a text equal to a text representation of a sample rate, and an object equal to a sample rate (an integer value type-casted to TObject).
Not all codecs provide a list of acceptable sample rates.
After calling this function, you can use AList to choose possible value of:
•AudioSampleRate property of TRVCamRecorder component;
•EncodeSampleRate property of TRVAudioPlayer component.