Author Topic: 3D Sound System  (Read 160252 times)

Offline Enerccio

  • bit
  • Posts: 9
    • View Profile
Re: 3D Sound System
« Reply #15 on: January 08, 2012, 03:41:29 PM »
It happens every time I play music, doesn't matter how many sounds were before. It will simply stay. Closer inspection will give me that underlining DataLine is reporting it to be active.

The reason why I switched to JavaSound was, that LWJGL one was incredibly choppy and laggy playback.

As for the CachedUrlStream, yes, the change was the amount from 20 to 5 (thread sleep was probably just a testing change), because without it, small oggs, would be stack at  7 pages, looping forever.

I also have an user question, how can you play same source more than one time simultaneously? Possibly with one source, because having multiple names for many sources is inconvenient.

Because right now, with preloaded sound, I use quickPlay every time, but sometimes it lags before playing in the quickPlay method for some reason:

it will lag between
HERE
and
THERE

this is my player:

http://paste.pocoo.org/show/ok7jOd0qmHZfkkkiBhYa/ [nofollow]
« Last Edit: January 08, 2012, 03:47:28 PM by Enerccio »

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3449
  • Developer
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #16 on: January 08, 2012, 04:17:43 PM »
That is very strange.  Since you mention it is just music, I assume this is only streaming sources that are having the problem?  I'll see if I can come up with a verbose test for you to run to figure out whats going on.  Could you also try a couple other formats/ codecs if you haven't already? (just to rule out a problem with CodecJOgg)

QuickPlay will lag when having to load the sample into memory for the first time.  If you call loadSound for the file (or url + identifier) in your initialization code, then subsequent calls to quickPlay should not have any delay before playing.

It is not possible to play a single source multiple times simultaneously with the way the library is currently designed.  A source is assigned to at most one channel at a time, so only one instance of it can play at a time.
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 Enerccio

  • bit
  • Posts: 9
    • View Profile
Re: 3D Sound System
« Reply #17 on: January 08, 2012, 04:36:27 PM »
I see. The lag with HERE and THERE happens randomly, and by that I mean randomly by runs, one time it will go, other time it will lag, with most time it will go ok.

Btw, is it possible to stop add sounds (not music) altogether in one command?

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3449
  • Developer
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #18 on: January 08, 2012, 04:40:50 PM »
is it possible to stop add sounds (not music) altogether in one command?

Not yet.  That sounds useful though, so I'll add it.
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 Enerccio

  • bit
  • Posts: 9
    • View Profile
Re: 3D Sound System
« Reply #19 on: January 12, 2012, 11:07:57 PM »
any news on the debugging version?

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3449
  • Developer
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #20 on: January 13, 2012, 04:32:33 AM »
I'll write it tomorrow.

In the mean time, could you let me know a couple more things (so I know where to put the most debug messages):

1) Does this only happen when playing music using CodecJOgg, or do CodecJOrbis and CodecWav do the same thing?
2) If the music is set to "looping", does it loop or only play once and get stuck?
3) If you queue more than on sample to the stream, do all the queued samples play, or only the first one?
4) If you call "stop()" on the stream before calling "play()", does it restart to the beginning, or does it stay stuck?
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 Paul

  • Administrator
  • double
  • *****
  • Posts: 3449
  • Developer
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #21 on: January 17, 2012, 05:03:19 AM »
This has a lower priority at the moment until I get the next Mupen64Plus AE update out the door, so I'll wait for your answers to write the test build.
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 Enerccio

  • bit
  • Posts: 9
    • View Profile
Re: 3D Sound System
« Reply #22 on: January 22, 2012, 01:29:40 AM »
sorry for the late reply, but I was swamped with the exam period work.

The same happens with JOrbis and CodecWav doesn't play anything at all.

It means that the song will play once, but never repeats.

More than once seems to play at least with music and sound fx, it works correctly.

I don't have a stream, I was using the backgroundMusic feature, with loop set on.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3449
  • Developer
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #23 on: January 22, 2012, 03:40:06 AM »
Ok, I'll write a couple tests for you to answer the other questions.  backgroundMusic creates a streaming source, and it sounds like the problem is with looping.  I'll start with figuring out if it affects the stream queue first, and if it only affects the looping streams or also with stop/ play, so I know where to put the debug messages.

Not related to your  problem, but weird that CodecWav doesn't work for you, though, could you post a link to a WAV file that doesn't work?
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 Paul

  • Administrator
  • double
  • *****
  • Posts: 3449
  • Developer
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #24 on: January 22, 2012, 03:41:25 PM »
Ok, please run the following test applet:

Test Applet

Perform the following procedures and let me know the results:

1) Press "1" to run the OGG Stream Loop.  Let me know if it loops or only plays once.
2) Press "2" to run the OGG Stream Sequence.  Let this one play for a while, and let me know if it makes it through the sequence (you will know it made it through the sequence if it eventually plays the music loop from #1 above.  Also let me know if the looping works or if the last music clip in the sequence only plays once.
3) Press "3" to run the WAV Stream Loop.  Let me know if it plays, and if so if it loops or only plays once.
4) Press "Esc" and close the browser window.

This should give me a better idea where to focus the comments to locate the two problems you are having

NOTE: I don't think you mentioned what OS you are running.  The above applet might not work on Linux (it won't detect the key events), so if that happens I'll have to come up with a different test.  You might need to click on the applet's canvas for it to gain focus.
« Last Edit: January 23, 2012, 02:09:54 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

Offline Enerccio

  • bit
  • Posts: 9
    • View Profile
Re: 3D Sound System
« Reply #25 on: January 30, 2012, 11:33:22 AM »
Yes, I have arch linux 64 bit with openjdk. And it doesnt do anything.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3449
  • Developer
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #26 on: January 30, 2012, 11:40:58 AM »
Ok, sorry, I'll write a different one (applets need to have a canvas to pick up the key events.. really dumb bug that only affects Linux)
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 Enerccio

  • bit
  • Posts: 9
    • View Profile
Re: 3D Sound System
« Reply #27 on: February 07, 2012, 10:27:20 AM »
Okay, I will wait then.

Offline Desmaster

  • bit
  • Posts: 2
    • View Profile
Re: 3D Sound System
« Reply #28 on: March 02, 2012, 11:22:54 AM »
Where can I find paulscode.sound.codecs.CodecJOrbis ?

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3449
  • Developer
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #29 on: March 02, 2012, 02:00:40 PM »
Where can I find paulscode.sound.codecs.CodecJOrbis ?

First post of this thread (JOrbis codec plug-in)
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