Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Nummie

Pages: [1]
Ohhh, the JavaSound bit does make perfect sense. Have any idea of how I could "emulate" this? I know Java was smart and removed support for the default mixer...

As for the code, sorry I didn't post it originally. You, seemingly, are one of the few people alive who still employ anti-spam. Here it is...
public void playSound(boolean priority, String identifier, boolean loop, float x, float y, float z, float pitch) {
      sound.newSource(priority, identifier, identifier, loop, x, y, z, SoundSystemConfig.ATTENUATION_ROLLOFF, SoundSystemConfig.getDefaultRolloff());
      if(LibraryLWJGLOpenAL.alPitchSupported()) sound.setPitch(identifier, pitch);

...and for moving my player...
public void repositionListener(EntityPlayer player, float x, float y) {
      sound.setListenerPosition(x, y, 0F);
      sound.setListenerOrientation(Mineblock.getSingleplayerGame().getPlayerController().getPlayer().getEyeLocation().getX(), Mineblock.getSingleplayerGame().getPlayerController().getPlayer().getEyeLocation().getY(), 0F, x, y, 0F);
...this method, which gets called every player step.

Really appreciate your help, Paul.

Other Support / LibraryLWJGLOpenAL does not allow Listener to Function
« on: January 21, 2018, 12:34:48 PM »
So I'm at a loss. I have a basic setup where LibraryJavaSound is a backup from OpenAL. LibraryJavaSound works perfectly for Listener positions and fading, but not pitch. OpenAL is JUST the opposite.

I have a method called repositionListener which passes arguments for a Player object, float x, float y. This method is called in a step method every time the player moves. It works only for LibraryJavaSound and I have spent hours trying to figure this out. All it contains is setListenerPosition and setListenerOrientation. Why won't it work for OpenAL specifically?

Any help would be appreciated.

Pages: [1]