<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Thank you for the information about
      what libogg is. Oggdec sounds interesting, but I don't think I can
      integrate command line tools into my project. I won't be encoding
      the audio but rather receiving it from icecast stream where I only
      have control of the Kbps of the steram.<br>
      <br>
      Seeking is not a concern. I want to be able to directly see the
      data and encode a buffered audio clip. I want to use that clip as
      input to a visualizer. That's why using something like BASS, which
      has a great icecast client built-in, won't be as useful to me.<br>
      <br>
      Are there any more suggestions on the first steps of building my
      VS sln with libogg and libvorbis?<br>
      <div class="moz-signature">
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
        <title></title>
        <div class="moz-signature">
          <div class="moz-signature">
            <pre>Best,
Andy S. Martin

<a href="http://www.guitarrpg.com">www.guitarrpg.com</a><font color="#333333">
M.S. Computer Science Game Development
University of Southern California '2013 Alumni</font>
</pre>
          </div>
        </div>
      </div>
      On 10/3/13 12:09 AM, Gunter Königsmann wrote:<br>
    </div>
    <blockquote
      cite="mid:abf45eee-5dab-4175-8def-78d07ec91276@email.android.com"
      type="cite">The last time I had I decode ogg the source code of
      oggdec did nearly read like documentation. If I remember it right
      it basically ran a batch of initialization functions from libogg
      and libvorbis (the first three packets are the header containing
      the info that the file uses the vorbis codec, the metadata and
      everything the vorbis codec needs to know in order to to decode
      the data; Libogg's task is to divide the steam into packets).
      After the decoder has been informed about the header it can decide
      any packet libogg will output. You can even leave out any number
      of packets or throw in a "end-of-file" packet followed by a new
      header at any time.<br>
      <br>
      If you write the encoder as well there is one thing I would ask
      you to ask: there is a so-called granulepos field in every packet
      telling how much time has passed since the beginning of the steam
      to help with seeking. The unit this information is given in is
      basically irrelevant. It might be milliseconds, samples or
      something similar. But it has to steadily increase all the time or
      else some players will crash - or get lost when attempting to seek
      in the steam.<br>
      <br>
      Kind regards<br>
      <br>
      Gunter.<br>
      <br>
      <div class="gmail_quote"><br>
        <br>
        Andy Martin <a class="moz-txt-link-rfc2396E" href="mailto:zippo227@gmail.com">&lt;zippo227@gmail.com&gt;</a> schrieb:
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <pre class="k9mail">I would like to program a basic OGG decoder that takes in an array of 
bytes (unsigned char *) and return an array of floats. Presumably I 
could then pass these floats to be read as PCM data which can be 
immediately interpreted as audio (by Unity3D). The starting point would 
be the header of an icecast stream (I know I'm not in the icecast 
mailing-list, but that is only the basic starting point). From then on, 
I would be dumping raw ogg bytes into this function and returning 
floats. I am working in the games industry using C++ and C# every day, 
but I have less experience than I would like using open-source libraries.

Presently, I can get a continuous stream of bytes of OGG from an 
asynchronous HttpWebRequest through C#. I want to pass those bytes into 
the function that I'm describing. Shouldn't I be able to pass any random 
sequence of bytes into this function and get some kind of float pattern 
that can be read as PCM (thought it may sound awful if it is truly a 
random array of bytes)?

For those interested, my starting point is a Windows8 machine with 
Visual Studio, but I would eventually like to port the project to XCode.

As I read the Vorbis documentation, I find it very difficult to find a 
place to start. What are the significant traits of the important 
libraries, ogg and vorbis, and how do they work together? What are the 
steps I need to follow, and where can I get more information than the 
documentation has? I probably just need to chat with someone who really 
knows what they're doing, but, the people I know used JUCE. They've used 
the JUCE library to do something like this, but I would like to do a 
straight-forward use of the open-source XIPH libraries.  There are many 
warnings about not using the low-level API, and most of the links on 
<a moz-do-not-send="true" href="http://xiph.org">xiph.org</a> are for pre-existing ogg players instead of source code for 
making your own player.

I really appreciate any help and am open to get on the group chat at 
some point.
<hr>
Vorbis-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Vorbis-dev@xiph.org">Vorbis-dev@xiph.org</a>
<a moz-do-not-send="true" href="http://lists.xiph.org/mailman/listinfo/vorbis-dev">http://lists.xiph.org/mailman/listinfo/vorbis-dev</a>
</pre>
        </blockquote>
      </div>
      <br>
      -- <br>
      Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
      gesendet.
    </blockquote>
    <br>
  </body>
</html>