Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (754)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Joal and Ogg Vorbis  (Read 4516 times)
0 Members and 1 Guest are viewing this topic.
Offline antoinelechacal

Junior Devvie

« Posted 2006-06-21 10:58:12 »

Hi all.

I'm considering using joal for the game I'm working on.
I want to use .ogg audio files, but I don't know how to play such files using joal...

Could you give me any help please?

My name is nobody
Offline Ultraq

Junior Devvie

That's what she said

« Reply #1 - Posted 2006-06-22 03:55:33 »

Following-on from the 7 OpenAL tutorials linked to from the JOAL page, there is a 'secret' 8th lesson which hasn't been converted to Java.  This 8th lesson deals with streaming of OggVorbis files.  If you can bear converting it from C++ to Java in your head, then it might be worth looking into.

Otherwise, I'd a search for a description of the Ogg Vorbis file format (seeing as it's a royalty-free format, this information should be out there), preferably one which tells you the format of the header and how to go about decoding the sound data located in the body of the file.  Given the relative popularity of the Ogg file format, someone may have already written a free-to-borrow Ogg file decoder in Java which you can use.

Either way, once you have the decoded sound data, shove that into a ByteBuffer, load it into OpenAL in much the same manner as given in the other 7 tutorials (genBuffers -> bufferData -> genSources -> playSource), and the rest is history Smiley

Ultraq's Final MooCow
Bits and Pieces by Emanuel Rabina
Offline antoinelechacal

Junior Devvie

« Reply #2 - Posted 2006-06-22 11:04:24 »

Thanks for your answer.

I've already looked at this 8th C++ lesson, I've also considered porting it to Java, but the C++ code refers to "OggVorbis_File  oggStream;     // stream handle".
I don't know what it refers to using Java, if someone has any idea, this would be very helpful ;-)
Should I use Tom's OggInputStream?

If I find out any solution I will release the source code :-)
Thanks again

My name is nobody
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline willbracken

Junior Newbie

« Reply #3 - Posted 2007-02-03 19:58:05 »

it's a struct defined in the project, check out vorbisfile.h
in any case, if someone has converted this to Java, i'd like to find it as well
I'm a little rusty with C++ and don't want to reinvent the wheel either
Offline willbracken

Junior Newbie

« Reply #4 - Posted 2007-02-03 20:01:17 »

nevermind, it's here on the site! i didn't see it because it's not in the tutorial bundle.
Offline Orangy Tang

JGO Kernel

Medals: 57
Projects: 11

Monkey for a head

« Reply #5 - Posted 2007-02-03 21:13:20 »

Why not use JOrbis?

[ - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Pages: [1]
  ignore  |  Print  

DesertCoockie (20 views)
2018-05-13 18:23:11

nelsongames (68 views)
2018-04-24 18:15:36

nelsongames (65 views)
2018-04-24 18:14:32

ivj94 (748 views)
2018-03-24 14:47:39

ivj94 (79 views)
2018-03-24 14:46:31

ivj94 (595 views)
2018-03-24 14:43:53

Solater (95 views)
2018-03-17 05:04:08

nelsongames (168 views)
2018-03-05 17:56:34

Gornova (378 views)
2018-03-02 22:15:33

buddyBro (1038 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!