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

Martin Peach martin.peach at sympatico.ca
Sat Apr 5 05:21:37 CEST 2014


I think it's here:

http://sourceforge.net/p/pure-data/patches/

Martin

On 2014-04-04 21:49, Rafael Vega wrote:
> Even more stuff ;)
>
> In the same file, oggread~.c there is a line that reads:
>
>      if((x->x_file = sys_fopen(filename->s_name, "r")) < 0)
>
> But it should be:
>
>      if((x->x_file = sys_fopen(filename->s_name, "rb")) <= 0)
>
> Now, to figure out how to submit a patch to pd-extended :P
>
>
>
>
>
> On Fri, Apr 4, 2014 at 7:22 PM, Rafael Vega <email.rafa at gmail.com
> <mailto:email.rafa at gmail.com>> wrote:
>
>     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 <http://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
>     <mailto: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 <mailto:email.rafa at gmail.com>
>
>
>
>
>     --
>     Rafael Vega
>     email.rafa at gmail.com <mailto:email.rafa at gmail.com>
>
>
>
>
> --
> Rafael Vega
> email.rafa at gmail.com <mailto:email.rafa at gmail.com>
>
>
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
>




More information about the Pd-dev mailing list