Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
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  
  Streaming OGG  (Read 2558 times)
0 Members and 1 Guest are viewing this topic.
Offline JonathanC

Senior Newbie





« Posted 2008-01-07 08:29:22 »

The optimal solution right now (EasyOGG) doesn't allow you to stream OGG's in, which is terribly suboptimal if you're trying to play back music. I want to do this using pure Java (no OpenAL or native libraries) - is there any pre-existing solution, and if not, how would I go about rolling my own code for this?
Offline kevglass

JGO Kernel


Medals: 85
Projects: 25


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1 - Posted 2008-01-07 09:25:12 »

For interest, EasyOgg doesn't load the whole Ogg up, it bites chunks off and feeds them into JOrbis/JOgg.

Kev

Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #2 - Posted 2008-01-07 10:49:44 »

You ever got it streaming successfully through OpenAL though Kev? I just can't get it to work reliably. Random OpenAL errors abound. Works for a bit then barfs, like some sort of threading issue - except OpenAL is supposedly thread-safe.

Cas Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline kevglass

JGO Kernel


Medals: 85
Projects: 25


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #3 - Posted 2008-01-07 10:50:44 »

Seems to work for me, at least I don't get error reports about it recently. There are the odd OGG that JOgg doesn't like tho :/

Kev

Offline erikd

JGO Ninja


Medals: 15
Projects: 4
Exp: 14 years


Maximumisness


« Reply #4 - Posted 2008-01-07 20:22:16 »

I got the same issue with OpenAL errors and I also suspected threading, and after some googling people seemed to have fixed it by making their code single threaded (also C based code that didn't use OGG at all, just streaming to OpenAL...).

I tried to change the code so that the streaming doesn't go in its own thread, but that didn't help.
I'm not using EasyOgg, although the code essentially does the same thing. Also, on my laptop the problems seem to be more severe than on my desktop (on my desktop I can just ignore the errors and music will keep playing).

Could it be something on the native side of OpenAL?

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.

xsi3rr4x (18 views)
2014-04-15 18:08:23

BurntPizza (15 views)
2014-04-15 03:46:01

UprightPath (28 views)
2014-04-14 17:39:50

UprightPath (13 views)
2014-04-14 17:35:47

Porlus (29 views)
2014-04-14 15:48:38

tom_mai78101 (54 views)
2014-04-10 04:04:31

BurntPizza (111 views)
2014-04-08 23:06:04

tom_mai78101 (212 views)
2014-04-05 13:34:39

trollwarrior1 (181 views)
2014-04-04 12:06:45

CJLetsGame (187 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!