Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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  
  JAudioLibs  (Read 2107 times)
0 Members and 1 Guest are viewing this topic.
Offline nsigma
« Posted 2011-08-01 18:39:46 »

Hi,

I've finally got around to releasing some of the audio libraries from Praxis as separate releases.  The first two of these are up here - http://code.google.com/p/java-audio-utils/ (or jaudiolibs.org - points to the same place!)

First of these may be of less interest round here, JNAJack is a binding to JACK Audio Connection Kit http://jackaudio.org/.  Second is the AudioServers API, with low-latency audio servers based on JNAJack and (possibly more useful around here) JavaSound.  The JACK stuff is LGPL, and the JavaSound server is GPL2 w/CPE (mainly because it uses the float conversion tools from Gervill).

The low-latency JavaSound approach is achieved by using a non-blocking write to audio lines.  The methodology is cribbed from various blog posts and mailing list comments by people over the years - I'm not assuming much credit for the approach!  Smiley I've not tested on Windows myself, but on Linux and Mac I've had sub-256 sample buffers working.

This code doesn't do either DSP or software mixing, it offers a basic callback API for processing floatbuffers, and that's your lot!  For the rest you'll have to wait for me to get the AudioOps and RAPL libraries also exported from Praxis which may take a little more time.

Best wishes,  Neil

Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
Offline gouessej
« Reply #1 - Posted 2011-08-01 22:18:54 »

Hi

Could your source code be useful to implement a low latency software mixer for Paul Lamb Sound Library? Using such a mixer would allow me to work around some bugs (not all) and limitations of JavaSound without using JOAL and OpenALSoft.

Offline nsigma
« Reply #2 - Posted 2011-08-02 07:24:45 »

Hi

Could your source code be useful to implement a low latency software mixer for Paul Lamb Sound Library? Using such a mixer would allow me to work around some bugs (not all) and limitations of JavaSound without using JOAL and OpenALSoft.

Possibly.  All the server does is provide you with floatbuffers to read from and write to.  I don't know much about that library, but I don't think it uses float buffers internally - however software mixing is much easier with floating point so it's worth converting first.  You'd have to either implement your own mixing on top of the server library, or you could extract RAPL from Praxis (that library needs some tidying up and documenting before it's properly ready for a separate release).

One thing that bothers me about Paul's library from having a quick look at the source code is the various synchronized methods and multiple threads in the core.  This could be a problem - check out the Performance section here (http://code.google.com/p/java-audio-utils/wiki/GettingStarted_AudioServers), and also the article it links to.  Basic point - never block your audio thread.

Incidentally, I posted a link to the Praxis source code in Paul's thread about a software mixer almost a year ago.  This code hasn't changed much since then - I'm just getting around to tidying up, documenting and releasing things from Praxis separately.


If you want to see if the audioservers library will provide you with better performance on your system before you start, you could download Praxis LIVE and its examples.  Then -

  • Open example 3 - Audio in the projects tab.
  • Use the popup menu on the project to build the project.
  • Open the audio.pxr file from the project
  • Click on the background of the patcher to select the audio container.  Its properties should show in the Properties tab to the right.  Notice the buffersize parameter - will be set to 1024
  • Right click the popup menu on the project to run the project and you should hear some audio and get a GUI to manipulate it with.
  • If all is well, use the project menu to clear all, then build again and change the buffersize down (ideally in powers of 2). With the low latency kernel I'm using I can get this down to 64 samples, though higher values are probably more than adequate for you.

If for any reason the audio fails because it picks the wrong mixer (I know you've had some issues with this in the past), enter part of the name of the right mixer in the device property of the audio container (this uses String.contains() to find the first match).  The next Praxis LIVE release will have a better GUI for selecting audio parameters!  Smiley

Best wishes,  Neil

Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
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.

Dwinin (28 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (72 views)
2014-09-10 06:39:09

Tekkerue (37 views)
2014-09-09 02:24:56

mitcheeb (57 views)
2014-09-08 06:06:29

BurntPizza (43 views)
2014-09-07 01:13:42

Longarmx (27 views)
2014-09-07 01:12:14

Longarmx (34 views)
2014-09-07 01:11:22

Longarmx (34 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!