Building a client, where to start ?

37 views
Skip to first unread message

Carl

unread,
Dec 5, 2011, 10:43:45 AM12/5/11
to JAudioLibs
Hello there!

JAudioLibs seems to be a very interesting concept, allowing for our
Java based audio enhancement software to connect to Jack. See www.soundpimp.com

I have built JNAJack in NetBeans and the SineAudioSource example is up
and running (from within NetBeans). Hence I am going to create an
experimental client to programmatically integrate our software with
the Jack server. Working on the fly and using low latency (very small)
buffers, the SoundPimp software does some DSP on the input stream and
concurrently sends out the resulting stream. So the task at hand is to
concurrently send this buffer to output.

Hence, I am going to replace the default Java Sound Audio Engine
output with Jack, via JNAJack. Why? This is due to certain limitations
in the Java Runtime on OSX. For such purpose, would the mimicking of
SimpleAudioClient be a good starting point, or can anyone point me to
another first step that would be more effective?

Thanks for any response
Carl

Neil C Smith

unread,
Dec 5, 2011, 11:14:18 AM12/5/11
to jaudi...@googlegroups.com
Hi Carl,

Thanks for your email.

As a first choice I'd recommend going with the AudioServer API.
Implement AudioClient within your application, and pass an instance of
it into JackAudioServer. This will handle most common use cases. The
main thing this won't let you do currently is automatically start the
JACK server - this feature will be implemented at some point in the
near future, although it's not that easy to configure server settings
for the end user in this scenario (a JACK issue -
http://trac.jackaudio.org/wiki/jackdrc%285%29 ). It will also not
attempt to change the samplerate or buffersize of the running JACK
server - I have doubts that's a nice thing to do anyway!

If you do need to make changes to the code, I'd still recommend
JackAudioServer rather than SimpleAudioClient as a starting point.

These classes are within the source download, and also within the
Praxis code repo.

AudioClient - http://code.google.com/p/praxis/source/browse/audio.servers/src/org/jaudiolibs/audioservers/AudioClient.java
JackAudioServer -
http://code.google.com/p/praxis/source/browse/audio.servers.jack/src/org/jaudiolibs/audioservers/jack/JackAudioServer.java

NB. Be aware that the run() method of the server will not return until
the client or JACK shuts down, so run it in a separate Thread. This
is to ensure consistent behaviour across AudioServer implementations.

Best wishes,

Neil

> --
> JAudioLibs - http://code.google.com/p/java-audio-utils/
>
> You received this message because you are subscribed to the Google
> Groups "JAudioLibs" group.
> To post to this group, send email to jaudi...@googlegroups.com
> To unsubscribe from this group, send email to
> jaudiolibs+...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/jaudiolibs?hl=en?hl=en

--
Neil C Smith
Artist : Technologist : Adviser
http://neilcsmith.net

Reply all
Reply to author
Forward
0 new messages