[Vorbis-dev] OGG loads as a naked file, but not if embedded in an IFF.

Conrad Parker conrad at metadecks.org
Mon Dec 16 14:20:54 PST 2013


On 11 December 2013 06:43, <dave at 661.org> wrote:

> On Wed, 11 Dec 2013, Conrad Parker wrote:
>
>
>> On 8 December 2013 16:57, <dave at 661.org> wrote:
>>
>>       I can now load 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 repo at
>>       https://github.com/DavidGriffith/blorbsnd.  Would someone please
>>       help me
>>       out?
>>
>> which of those files contains the non-working code?
>>
>
> Those would be blorbsnd3.c and blorbsnd4.c.  At this point I'm considering
> not using libsndfile since I have AIFFs and OGGs loading without its
> assistance.  I have not yet tried to move code from playogg.c to another
> iteration of blorbsnd yet.  Still, I'd like to know why my code is behaving
> like this.


I like libsndfile, but it's not designed to support Ogg-in-AIFF. If your
game only needs to support these specific filetypes that you generate, one
of which isn't supported by libsndfile, then perhaps there's no need to use
libsndfile here.

Conrad.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/vorbis-dev/attachments/20131217/714c2d26/attachment.htm 


More information about the Vorbis-dev mailing list