search for: sf_open_fd

Displaying 2 results from an estimated 2 matches for "sf_open_fd".

2013 Dec 04
1
endian problems with AIFF and WAV
...or WAV file with libsndfile and plays then using libao. After running around in circles for a while, I found and fixed the problem, but I'm still confused as to why the solution works. Would someone 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 th...
2013 Dec 08
1
OGG loads as a naked file, but not if embedded in an IFF.
...and play AIFF, WAV, and OGG files using libsndfile and libao. Now I'm moving on to loading and playing files embedded in an IFF file. This is presenting a problem. Playing an AIFF embedded in an IFF works fine. Playing an OGG embedded in the same IFF fails. Specifically, it appears that sf_open_fd() can't figure out what it's being told to load. Except for extra code to tell the player function what offset to start at, the player function in the IFF-embedded player program is functionally identical to the one in the standalone player program. I have the test code in a Github re...