Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (482)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (550)
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 3281 times)
0 Members and 1 Guest are viewing this topic.
Offline antoinelechacal

Junior Member





« 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 Member




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.
http://www.devmaster.net/articles/openal-tutorials/lesson8.php

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 Member





« 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: 56
Projects: 11


Monkey for a head


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

Why not use JOrbis?

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CopyableCougar4 (14 views)
2014-08-23 07:31:30

atombrot (28 views)
2014-08-19 21:29:53

Tekkerue (25 views)
2014-08-16 18:45:27

Tekkerue (23 views)
2014-08-16 18:22:17

Tekkerue (15 views)
2014-08-16 18:20:21

Tekkerue (22 views)
2014-08-16 18:12:11

Rayexar (61 views)
2014-08-11 14:49:23

BurntPizza (39 views)
2014-08-10 09:09:32

BurntPizza (31 views)
2014-08-08 14:01:56

Norakomi (37 views)
2014-08-07 07:49:38
List of Learning Resources
by Longor1996
2014-08-16 22:40:00

List of Learning Resources
by SilverTiger
2014-08-06 07:33:27

Resources for WIP games
by CogWheelz
2014-08-02 04:20:17

Resources for WIP games
by CogWheelz
2014-08-02 04:19:50

List of Learning Resources
by SilverTiger
2014-08-01 04:29:50

List of Learning Resources
by SilverTiger
2014-08-01 04:26:06

List of Learning Resources
by SilverTiger
2014-07-31 23:54:12

HotSpot Options
by dleskov
2014-07-08 13:59:08
java-gaming.org 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‑gaming.org
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!