Record into WAV file

前端 未结 2 377
心在旅途
心在旅途 2021-01-03 05:15

Since I\'ve posted this question, I\'ve been trying to write a valid WAV file myself from raw PCM data. I\'ve managed to write the FLAC converter (tested and works), but it

2条回答
  •  我在风中等你
    2021-01-03 05:47

    TRY THIS:

    printf("Channels: %d\n", hdr->number_of_channels);
    for (i = 0; i < 2*16000/128; i++)
    {
        printf("\n Recording %d",i);
        err = snd_pcm_readi(handle, buffer, frames);
        write(filedesc, buffer, size);
     }
    

提交回复
热议问题