Author Topic: SoundSystem LibraryJOAL Mixer Isn't Working  (Read 2222 times)

Offline bgroenks96

  • bit
  • Posts: 7
    • View Profile
SoundSystem LibraryJOAL Mixer Isn't Working
« on: January 11, 2014, 12:23:01 AM »
I'm using SoundSystem with LibraryJOAL plugin and JOrbis for OGG audio.

When I start a new streaming sound from a URL at any given position, I get no attenuation or positioning effects.

Am I missing something?  Do I need to set something before this works on JOAL?  The same code was working fine with positioning on LibraryJavaSound.

This is a Linux Mint 15 system btw running a Sun/Oracle JDK7 VM.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3473
  • Developer
    • View Profile
    • PaulsCode.Com
Re: SoundSystem LibraryJOAL Mixer Isn't Working
« Reply #1 on: January 11, 2014, 09:47:29 AM »
Make sure it is a mono sound (3D positioning doesn't function in OpenAL for stereo sounds)
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline bgroenks96

  • bit
  • Posts: 7
    • View Profile
Re: SoundSystem LibraryJOAL Mixer Isn't Working
« Reply #2 on: January 11, 2014, 10:24:13 AM »
Make sure it is a mono sound (3D positioning doesn't function in OpenAL for stereo sounds)

Really?  Does the sound still play in stereo?  I know I've heard SoundSystem used in games like Minecraft before and I never noticed the sounds being mono.

Do you know why it is that OpenAL has to have mono?

Offline bgroenks96

  • bit
  • Posts: 7
    • View Profile
Re: SoundSystem LibraryJOAL Mixer Isn't Working
« Reply #3 on: January 11, 2014, 11:13:18 AM »
You were right, though.  That was the problem.  Thanks Paul!

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3473
  • Developer
    • View Profile
    • PaulsCode.Com
Re: SoundSystem LibraryJOAL Mixer Isn't Working
« Reply #4 on: January 11, 2014, 12:02:36 PM »
Stereo has left and right audio information that are not necessarily both the same.  3D effects are accomplished by adjusting the volume of the left and right data independently of each other.  Unless left and right data of a sound is the same, the result of the 3D effects are unpredictable.  When I wrote the 3D calculation code for the JavaSound library plugin, I left that unpredictability up to the user to decide whether or not it was acceptable.  The developers of OpenAL, though, simply prevented stereo sounds from being affected by positional information at all, limiting 3D effects to mono sounds only.
« Last Edit: January 11, 2014, 12:04:25 PM by Paul »
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted