Re: [linux-audio-dev] digital audio app...

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] digital audio app...
From: David Slomin (dgslomin_AT_CS.Princeton.EDU)
Date: la syys   18 1999 - 23:18:13 EDT


On Sat, 18 Sep 1999, Jair-Rohm wrote:

> I started this project as an application. I am beginning to wonder if
> it is possible (using the .sun classes) to perform manipulations on an
> audio file such as play it backwards. As far as i can ascertain, i
> would have to convert the sound (AudioDataStream) to a
> ByteArrayInputStream in order to have the sound available as an array
> of bytes that i may later have my way with. Unfortunately, i've not
> been able to mange this conversion. Is it possible that this type of
> manipulation is only possible from within an Applet? I'm developing in
> Blackdown 1.1.7 using GNU Emacs with the JDE.

You're in for quite a lot of pain if you want to do audio with pure Java.
You proposed using the sun.audio* classes, but they are (1) only available
when running on a true Sun branded JVM (not Borland, Microsoft, Symantec,
etc); (2) only availble in applications, not applets; (3) not documented,
promised for future compatibility, or officially supported by Sun; (4)
severely limited by an arbitrarily low maximum sampling rate; and (5) only
good for sample playback, not for streaming or sample manipulation. If
you absolutely must use them, then only use them for post-mixdown
playback; ie: read the sound files manually using your own parser, do your
manipulations on them as byte arrays, then convert to sun.audio*
structures at the last minute (writing out temp files and reading them
back in using the sun.audio* API if necessary).

If this sounds as terrible to you as it did to me, you might be tempted
to switch to the "new" Java Media Framework. This, however, has been
promised by Sun for a minimum of three years and was never delivered. I
have given up all hope of them ever making good on this vaporware.

Sadly, JNI starts to look attractive in this situation, even though that
breaks with the nice run-anywhere dream.

A little disclaimer: my data on all I just said is somewhat out of date...
as I said, I gave up on Sun fixing the problems some time back, after they
slowrolled too long. Hopefully the situation is not as bad today as it
was when I last grappled with it.

I wish you the best of luck,
Div.

P.S. I haven't given up on Java, and I'm still using it to write music
apps. However, I no longer have any illusions about being able to do it
without JNI.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:27:12 EST