Convert raw PCM to FLAC?

前端 未结 3 1065
轮回少年
轮回少年 2021-01-13 23:57

EDIT: I\'ve updated the code below to resemble the progress I have made. I\'m trying to write the .wav header myself. The code does not work

3条回答
  •  余生分开走
    2021-01-14 00:59

    If I understand the FLAC::Encoder::File documentation, you can do something like

    #include 
    
    FLAC::Encoder::File encoder;
    encoder.init("outfile.flac");
    encoder.process(buffer, samples);
    encoder.finish();
    

    where buffer is an array (of size samples) of 32-bit integer pointers.

    Unfortunately, I know next to nothing about audio encoding so I can't speak for any other options. Good luck!

提交回复
热议问题