Help - Search - Members - Calendar
Full Version: Open-Source Ogg Vorbis Player
Hydrogenaudio Forums > Lossy Audio Compression > Ogg Vorbis > Ogg Vorbis - General
Berki
Hello!

Does anybody know a simple open source Ogg Vorbis Player? I want do understand this codec and maybe write an own one based on this great codec. Has someone tips for the understanding of this codec?

Many Thx
Berki
Valefor
I have no tips on coding a player, but CoolPlayer at :
http://coolplayer.sourceforge.net is free, simple and open.
john33
QUOTE(Berki @ Sep 27 2003, 08:50 PM)
Hello!

Does anybody know a simple open source Ogg Vorbis Player? I want do understand this codec and maybe write an own one based on this great codec. Has someone tips for the understanding of this codec?

Many Thx
Berki

You could download my version of oggdec, .exe and source, from Rarewares. It is primarily a decoder, but with a very simple playback option. The code should give you a reasonable understanding of how easy it is to implement a vorbis decoder.

You will, of course need the ogg and vorbis libraries which you can obtain either from the links at vorbis.com, or xiph.org. The APIs are in vorbisfile. You can either use ov_read, or ov_read_float if you want greater flexibility of use with the decoded samples. You will find the documentation that comes with the libraries is very helpful.
Berki
Hello!

Thx for your replies. But if I want du compile oggdec i get following errors:

Include-File can't be opened: 'vorbis/float_math.h': No such file or directory

and

Include-File can't be opened: 'getopt.h': No such file or directory

i can't find this files anywhere! Please help me!

Thanks
Berki
john33
QUOTE(Berki @ Sep 28 2003, 09:15 AM)
Hello!

Thx for your replies. But if I want du compile oggdec i get following errors:

Include-File can't be opened: 'vorbis/float_math.h': No such file or directory

and

Include-File can't be opened: 'getopt.h': No such file or directory

i can't find this files anywhere! Please help me!

Thanks
Berki

OK, sorry!! I thought I had deleted the references to float_math.h. Please delete them, it is not needed.

getopt.h can be found in the directory vorbis-tools/include.
john33
I just uploaded the source again with the references to float_math.h removed.
Berki
hi

now VC++ gives me 25 errors sad.gif i don't know what i should do...

please help me
Berki
CODE
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\dither.h(22):  error C2061:  Syntax error:  Designator ' ogg_uint64_t '
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\dither.h(28):  error C2059:  Syntax error:  ' } ' and einstellungen\hugo\desktop\oggdecsrc\oggdec\dither.h(30)
c:\dokumente:  error C2061:  Syntax error:  Designator ' Dither '
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\dither.h(30):  error C2059:  Syntax error:  ';'  
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(70):  error C2061:  Syntaxorror:  Designator ' Dither '
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(70):  error C2059:  Syntax error:  ';'  
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(148):  warning C4018:  ' < ':  Conflict between signed and unsigned
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(256):  error C2224:  The left part of ' Dither ' must a structure/union its
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(256):  error C2198:  ' Random_Equi ':  Not sufficient parameters handed over
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(257):  error C2224:  The left part of ' LastRandomNumber ' must a structure/union its
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(258):  error C2224:  The left part of ' LastRandomNumber ' must a structure/union its
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(260):  error C2224:  The left part of ' Add ' must a structure/union its
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(260):  error C2224:  The left part of ' Mask ' must a structure/union its
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(264):  error C2224:  The left part of ' Dither ' must a structure/union its
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(264):  error C2198:  ' Random_Triangular ':  Not sufficient parameters handed over
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(264):  error C2224:  The left part of ' DitherHistory ' must a structure/union its
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(264):  error C2224:  The left part of ' FilterCoeff ' must a structure/union its
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(264):  error C2198:  ' scalar16 ':  Not sufficient parameters handed over
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(265):  error C2224:  The left part of ' DitherHistory ' must a structure/union its
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(266):  error C2224:  The left part of ' ErrorHistory ' must a structure/union its
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(266):  error C2224:  The left part of ' FilterCoeff ' must a structure/union its
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(266):  error C2198:  ' scalar16 ':  Not sufficient parameters handed over
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(267):  error C2224:  The left part of ' Add ' must a structure/union its
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(267):  error C2224:  The left part of ' Mask ' must a structure/union its
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(268):  error C2224:  The left part of ' ErrorHistory ' must a structure/union its
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(273):  error C2224:  The left part of ' Add ' must a structure/union its
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(273):  warning C4033:  ' dither_output ' a value return
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(346) must:  warning C4018:  ' < = ':  Conflict between signed and unsigned
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(353):  warning C4018:  ' < = ':  Conflict between signed and unsigned
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(360):  warning C4018:  ' < = ':  Conflict between signed and unsigned
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(367):  warning C4018:  ' < = ':  Conflict between signed and unsigned
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(374):  warning C4018:  ' < = ':  Conflict between signed and unsigned
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(381):  warning C4018:  ' < = ':  Conflict between signed and unsigned
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(388):  warning C4018:  ' < = ':  Conflict between signed and unsigned
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(637):  warning C4146:  A unaerer minus operator was assigned to an unsigned type;  the result is further unsigned
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(785):  warning C4244:  ' function ':  Conversion of ' _ _ int64 ' in ' unsigned int ', possible overrun
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(805):  warning C4244:  ' = ':  Conversion of ' doubles ' in ' int ', possible overrun
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(840):  warning C4244:  ' = ':  Conversion of ' doubles ' in ' int ', possible overrun
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(882):  warning C4244:  ' * = ':  Conversion of ' doubles ' in ' float ', possible overrun
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(896):  warning C4244:  ' = ':  Conversion of ' doubles ' in ' float ', possible overrun
c:\dokumente and einstellungen\hugo\desktop\oggdecsrc\oggdec\oggdec.c(898):  warning C4244:  ' = ':  Conversion of ' doubles ' in ' float ', possible overrun error when implementing cl.exe.
oggdec.obj - 25 errors, 16 Warnings
john33
sad.gif I truly apologise!

You will need to download the source again. I've added a modified os_types.h that replaces the header file of the same name in the ogg/include/ogg directory. All I've done to this is to add 64bit int data types.
Berki
Hello

Thx, but i still have 25 Error, not the same as before, but very similar... sad.gif

Could you please give me a step by step tutorial what i should do with VC++ (settings, ... ) to compile your program? It would be very nice an useful!


Many Thanks
Berki
john33
You need a directory structure similar to:

CODE
OggVorbis
     |
     |_________________________________
     |              |                  |
    ogg           vorbis          vorbis-tools
                                       |
                                    oggdec

My oggdec should replace the 'official' version of oggdec that is include in vorbis-tools.

If you don't have the Intel compiler, you will need to delete the reference to the library 'svml_disp.lib' in the libraries included in the link options. You may also see some initial warnings relating to compiler options for the Intel compiler, but don't worry about those, the VC compiler will just ignore them. The source should compile without any problem.
Berki
Hello!

Ok, I start at the very beginning again. I have made the directories as you have said. But i have done nothing else now. What should i do next? What shold i compile next? Please help me!

Many thanks!
Berki
john33
Start MSVC++ and load the .dsw project file from the oggdec directory.

Select Build/Set Active Configuration - oggdec Win32 Release.

The Project dependencies will be set automatically. Select Project/Settings. Then select oggdec Win32 Release. Go to the Link Tab and select General. Go to Object/Library modules: and delete svml_disp.lib from the end of the line. Select OK. You will not need to change any other settings.

Select Build/Rebuild All and it will compile the required libraries and should produce a clean compile of oggdec.
Berki
now i have 225 Erros, mostly "Not dissolved extern Symbol"...
john33
QUOTE(Berki @ Sep 28 2003, 04:15 PM)
now i have 225 Erros, mostly "Not dissolved extern Symbol"...

Hmmm, I get a perfectly clean compile here!! You can try using my project files for the libraries, from here: http://homepage.ntlworld.com/jfe1205/OVProject.ZIP
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.