Ducks in a Row, Inc., Logo

Contact Us
About Us
Inventory Tips

WinDOgg: A simple Ogg file decoder for games.

The Ogg file format and its codecs are rapidly becoming a standard for playing sound and video in games. It is powerful, efficient, and most importantly, license free.

Unfortunately, anyone who has worked with the libogg, and libvorbis knows that they can be daunting. We have a solution for that!

WinDOgg.dll is a tool to simplify reading an ogg file. It is efficient enough for use in games. You can easily use it to open ogg files and read frames of audio and video data into buffers. It also supports fast seeking and reading sound data at a specific PCM or video data at a specific scan line.*

To give you an idea of how fast, when we started this project, the standard way of seeking audio to an individual PCM was to start at the end of the Ogg page prior to the sample and decode forward until the desired sample was reached. Since an Ogg page contains 1/2 to 1 second of sound at 48 kHz, the standard method resulted in an average of 1/4 to 1/2 second of sound being decoded just to reach the position you wanted. Our software finds the packet prior to the one that contains the sample and decodes from there. Packets contain 128 or 1024 samples, so this results in 3/1000th to 4/100ths of a second of sound being decoded, with 18/1000ths being typical. This is roughly a 14-fold decrease in the amount of decoding required to seek to a position.

WindDOgg currently supports Theora (video) and Vorbis (audio), the two most common codecs used by ogg files. In addition, WinDOgg.dll is designed to be safe for naive multi-threading: Any thread can enter the .dll and request any frame from any file without a problem.

* Note that obtaining a specific scan-line of video currently requires the entire frame to be decoded. Performing scan-line decoding instead is on our do list.

WinDWAV: A simple WAV reader.

WinDWAV.dll provides the same interface for reading WAV files as WinDOgg does for ogg files, allowing you to use function pointers to abstract the reading of various file formats.

Free, but you can help.

WinDOgg.dll and WinDWAV.dll are free to use for commercial and non-commercial purposes. If you would like to support their development and help make them better, donate coffee money on the right.

What's Next?

Here are some things on our do list for improving these tools:

Upgrades to 1.x:
  • Move from an indexing pre-scan to an index-while-playing system. Currently, WinDOgg scans the entire file when it is opened, and indexes it for fast seeking. This takes negligible time for small sound effects and minutes-long video, but may take a noticeable amount of time for movie-length videos. Moving to a system in which the file is indexed as it its played would prevent this overhead, while still allowing rapid seeking in the indexed portions.

  • Implement scan-line decoding of video. Currently, WinDOgg decodes an entire frame of video at once, but allows individual scan lines to be recovered. Libtheora supports decoding a scan line at a time, and implementing this into WinDOgg would allow a thread that is processing window messages to decode video in small chunks and process the window messages in between.

  • Create 64-bit .dlls .
Upgrades to create 2.0:
  • Support other Ogg codecs and file formats, such as FLAC and Opus, and other royalty free codecs such as Dirac.

  • Permit, as an option, loading the entire ogg file into memory to increase seeking speed, or dispensing with indexing to reduce memory overhead. For heavily used files, preloading the file would allow an individual packet to be sought to and decoded at half the speed of playing through. This creates a strong and fast limit on the amount of time spent in seeking. Alternatively, for large files (such as full-length movies) that are not frequently sought into, dispensing with the index could conserve a significant amount of memory.

  • Track and report the memory usage.

  • Converting output into different sample rates, bit-depths, pixel formats, etc.
Upgrades to the system as a whole:
  • Build Macintosh and Linux versions. If possible, build equivalents for other platforms, such as Android, Windows Phone, and (possibly) iPhone or gaming consoles. (We would only produce public-use versions for platforms that would allow us to do so royalty-free.)

  • If there are any other royalty-free file formats and codecs, we would be interested in expanding the set of .dlls to include them. (For example, the H.264 mpeg codec is royalty free for "Internet Video," a statement that unfortunately says nothing about using it in games or building decoders and sound/video engines incorporating it.)


If you like WinDOgg and WinDWAV, but you don't want to use our .dlls, or you want to improve the source code for your own purposes, we are happy to sell non-exclusive licenses to the source code. Contact us.


If you have questions or bug reports about these .dlls, contact us.

Download WinDOgg and WinDWAV here
Donate to make WinDOgg better!
Please note that your donations are not tax-deductible