#include <sndfile.h>

int main(int argc, char* argv[]) {
    SF_INFO sfinfo;
    sfinfo.format = 0;
    SNDFILE* sndfile = sf_open(argv[1], SFM_READ, &sfinfo);
    int n;
    short* buf = new short[2000];

    while ((n = sf_read_short(sndfile, buf, 1000)) > 0) {
        for (int i = 0; i < n; i++) {
            printf("%f\n", buf[i] / 32768.0);
        }
    }
    sf_close(sndfile);
}
