LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: FMOD problem with webstart?  (Read 9232 times)

kappa

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1304
FMOD problem with webstart?
« on: April 09, 2006, 02:35:13 »

i have gotten fmod to work nicely with my app but problem is when i package it in a jar i can't seem to get the file to load, below is my load code

Code: [Select]
public static void load(String ref) {

System.out.println("Loading : " + ref);

File file = new File(ref);
if (!file.exists()) {
System.out.println("No such file: " + ref);
System.exit(0);
}

// using ref (path)
module = FMusic.FMUSIC_LoadSong(ref);
}


the problem comes since FMusic.FMUSIC_LoadSong(String ref) only supports a string and i can't seem to figure out how you would change it to get it to load the resource out of a jar, since URL isn't supported, any help on this would be appreciated!
Logged

Matzon

  • Demigod
  • *****
  • Offline Offline
  • Posts: 2242
FMOD problem with webstart?
« Reply #1 on: April 09, 2006, 07:46:47 »

read the file manually from the jar and feed it's contents via a butebuffer to LoadSongEx

Check StreamPlayerMemory.java for loading into buffer (FSound example though, but same idea).

kappa

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1304
FMOD problem with webstart?
« Reply #2 on: April 10, 2006, 16:03:04 »

ah ok thx, got it to work, btw will lwjgl be moving to fmod 4 any time soon? since it has the much wanted midi support on the linux systems too?
Logged

Matzon

  • Demigod
  • *****
  • Offline Offline
  • Posts: 2242
FMOD problem with webstart?
« Reply #3 on: April 11, 2006, 12:33:07 »

no, not planning on it any time soon - however someone might volunteer to do it and donate the code

WiESi

  • Regular nerd
  • **
  • Offline Offline
  • Posts: 70
FMOD problem with webstart?
« Reply #4 on: April 11, 2006, 14:54:42 »

If you really need FMOD 4 there's already a FMOD 4 port for Java: NativeFmodEx: http://jerome.jouvie.free.fr/Fmod/NativeFmodEx/index.php

WiESi
Logged