[PD] oggread~ not working on pd-extended or libpd on windows.

Rafael Vega email.rafa at gmail.com
Sat Apr 5 02:22:40 CEST 2014


Follow up:

Looking at the code for oggread~, I found that it does the actual opening
of the file with

    if(ov_open(x->x_file, &x->x_ov, NULL, -1) < 0)

on the ov_open documentation it warns windows programmers not to use
ov_open but ov_open_callbacks instead [1] and [2] so I changed that line to
the following and I'm getting the message "Bitstream does not contain any
Vorbis data". I'm pretty sure my file is a valid ogg file. I created it
using audacity and also tried with an ogg file downloaded from freesound.org
.

Any help with this will be very much appreciated

:)


        int ret = ov_open_callbacks(x->x_file, &x->x_ov, NULL, -1,
OV_CALLBACKS_DEFAULT);
        switch(ret){
            case OV_EREAD:
                 post("A read from media returned an error.");
                 break;
            case OV_ENOTVORBIS:
                post("Bitstream does not contain any Vorbis data");
                break;
            case OV_EVERSION:
                post("OV_EVERSION - Vorbis version mismatch.");
                break;
            case OV_EBADHEADER:
                post("Invalid Vorbis bitstream header.");
                break;
            case OV_EFAULT:
                post("Internal logic fault; indicates a bug or heap/stack
corruption.");
                break;
        }
        if(ret <0)



links:

[1] http://xiph.org/vorbis/doc/vorbisfile/ov_open_callbacks.html
[2] http://xiph.org/vorbis/doc/vorbisfile/ov_open.html



On Fri, Apr 4, 2014 at 5:48 PM, Rafael Vega <email.rafa at gmail.com> wrote:

> Hi.
>
> I am trying to use [oggread~] external on an application i'm developing
> with libpd. No problems on mac or linux. Howerver, on windows (xp and 8,
> 32bit) I keep getting an error message from oggread~ when I try to open an
> ogg file. Even ogg_read~-help.pd won't work:
>
> oggread~: file "C:/Users/rv/any.ogg" opened
> oggread~: error: could not open "C:/Users/rv/Desktop/any.ogg" as an
> OggVorbis file
> oggread~: file closed due to error
>
> I have tried pd-extended (both installer and standalone) and I also
> compiled oggread~ into my application and loaded it with libpd, same
> outcome.
>
> The weirdest part is that if I run pd vanilla, copy oggread~.dll from
> pd-extended into the "extra" directory, the ogg files are opened correctly.
>
> Any ideas on how to make this work? What kind of debug info can I provide?
>
> --
> Rafael Vega
> email.rafa at gmail.com
>



-- 
Rafael Vega
email.rafa at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20140404/55d4f249/attachment-0001.htm>


More information about the Pd-list mailing list