简体   繁体   中英

what is AV_SAMPLE_FMT_FLT

SwrContext *swr_ctx = swr_alloc_set_opts(NULL,                          
                        AV_CH_LAYOUT_STEREO,
                        AV_SAMPLE_FMT_FLT,
                        sample_rate,
                        pCodecParameters->channel_layout,                                                                               
                  
                        pCodecParameters->format,
                        pCodecParameters->sample_rate,                          
                        0,
                        NULL);

what exactly AV_SAMPLE_FMT_FLT is? i already read docs but i want to know that what is float layout means in the context of Audio. How actually binary data of audio will look in that format.

It means every sample is in single buffer and per sample data is 32bit float. Buffer AFAIK structured like this:

[SAMPLE_CH0][SAMPLE_CH1]...[SAMPLE_CHn]
[SAMPLE_CH0][SAMPLE_CH1]...[SAMPLE_CHn]

So on so forth. This repeats the number of "samples" times.
I may be wrong though, you need to check it yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM