search for: sf_read_int

Displaying 1 result from an estimated 1 matches for "sf_read_int".

2013 Dec 04
1
endian problems with AIFF and WAV
...eone please explain this to me so I don't trip over this again later in my project? I used sf_open_fd() to get a SNDFILE* pointer and an AF_INFO struct. In that struct I find out what bit resolution the samples are. I put that number into ao_sample_format format.bits, fill a buffer using sf_read_int() and then call ao_play(). Doing this with a file containing 8-bit samples, the result was the file playing at at half-pitch and twice as long as normal. But, if I manually plug in format.bits = 32, the files play fine. Here's the program: /* compile with "gcc -o foo foo.c -lao -ldl...