<div dir="ltr"><div><div>Follow up:<br><br>Looking at the code for oggread~, I found that it does the actual opening of the file with         <br><br>    if(ov_open(x-&gt;x_file, &amp;x-&gt;x_ov, NULL, -1) &lt; 0)<br><br></div>

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&#39;m getting the message &quot;Bitstream does not contain any Vorbis data&quot;. I&#39;m pretty sure my file is a valid ogg file. I created it using audacity and also tried with an ogg file downloaded from <a href="http://freesound.org">freesound.org</a>.<br>

<br></div><div>Any help with this will be very much appreciated <br><br>:) <br></div><div><br><br>        int ret = ov_open_callbacks(x-&gt;x_file, &amp;x-&gt;x_ov, NULL, -1, OV_CALLBACKS_DEFAULT);<br>        switch(ret){<br>

            case OV_EREAD:<br>                 post(&quot;A read from media returned an error.&quot;);<br>                 break;<br>            case OV_ENOTVORBIS: <br>                post(&quot;Bitstream does not contain any Vorbis data&quot;);<br>

                break;<br>            case OV_EVERSION:<br>                post(&quot;OV_EVERSION - Vorbis version mismatch.&quot;);<br>                break;<br>            case OV_EBADHEADER:<br>                post(&quot;Invalid Vorbis bitstream header.&quot;);<br>

                break;<br>            case OV_EFAULT: <br>                post(&quot;Internal logic fault; indicates a bug or heap/stack corruption.&quot;);<br>                break;<br>        }<br>        if(ret &lt;0)<br>

<br><br><br></div>links:<br><br>[1] <a href="http://xiph.org/vorbis/doc/vorbisfile/ov_open_callbacks.html">http://xiph.org/vorbis/doc/vorbisfile/ov_open_callbacks.html</a><div><div>[2] <a href="http://xiph.org/vorbis/doc/vorbisfile/ov_open.html">http://xiph.org/vorbis/doc/vorbisfile/ov_open.html</a><br>

<br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 4, 2014 at 5:48 PM, Rafael Vega <span dir="ltr">&lt;<a href="mailto:email.rafa@gmail.com" target="_blank">email.rafa@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi.<br><br></div>I am trying to use [oggread~] external on an application i&#39;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&#39;t work:<br>


<br>oggread~: file &quot;C:/Users/rv/any.ogg&quot; opened<br>oggread~: error: could not open &quot;C:/Users/rv/Desktop/any.ogg&quot; as an OggVorbis file<br>oggread~: file closed due to error<br><br></div>I have tried pd-extended (both installer and standalone) and I also compiled oggread~ into my application and loaded it with libpd, same outcome.<br>


<br></div>The weirdest part is that if I run pd vanilla, copy oggread~.dll from pd-extended into the &quot;extra&quot; directory, the ogg files are opened correctly.<br><br></div>Any ideas on how to make this work? What kind of debug info can I provide?<span class="HOEnZb"><font color="#888888"><br>


<div><div><div><div><br><div>-- <br><div dir="ltr"><div>Rafael Vega<br></div><a href="mailto:email.rafa@gmail.com" target="_blank">email.rafa@gmail.com</a></div>
</div></div></div></div></div></font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><div>Rafael Vega<br></div><a href="mailto:email.rafa@gmail.com" target="_blank">email.rafa@gmail.com</a></div>
</div>