• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Java and CoreAudio
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java and CoreAudio


  • Subject: Re: Java and CoreAudio
  • From: "Bob Lang" <email@hidden>
  • Date: Sun, 13 Jun 2004 16:56:14 +0100

Hi All

Snipped to save some space:
>
> Well, presumably since the code we are talking about is an audio
> effect, I would expect the core code to be completely portable. The
> wrapper that communicates with the target platform is almost certain to
> be completely different for each, so Java won't help you there.

That turns out not to be the case. Pure Java is *completely* portable.
A Pure Java sound/audio/midi application will run unchanged and without
requiring recompilation on a Mac, Windows, Sun or Linux platform -
and it will do it at high speed, too. All the nasty platform dependencies
are hidden from the programmer, so calls to the Pure Java AudioSystem
class are transparently mapped to the equivalent Core Audio classes
(Mac) or Direct X classes (Windows) or whatever the Linux classes are.
The same applies to MIDI I/O too.

There's nothing magical or mysterious about this. Java has been doing
this for years with its numerous GUI classes.

If you want an example of a portable Audio/Midi Java application, go
to my home page at www.cems.uwe.ac.uk/~lrlang and download the
Bezier Synthesizer.

Although it appears to be two separate downloads (for Windows
and Mac), in fact the Windows version is the same compiled code
file as the Mac version and the only difference is the readme files.
The code was compiled on the Mac but could just as easily have
been compiled on a Windows, Linux or Sun system.

> So while in theory Java makes a compelling cross-platform argument,
> if it isn't covered in the Java spec itself, it generally isn't
> something that Java makes any easier than any other language.

And wrong again! Pure Java is much more than the just the language
spec. It is a whole library of hundreds of classes, all of which have
been carefully written to cover a wide range of application domains
with complete cross platform compatibility. Java GUI classes
were available from day one; Sound and Midi has been available for
at least three years now.

Are there any other Java rumours, myths and chestnuts you'd like me
to demolish while I'm still in the mood ;-)

Bob

PS: Note the emphasis on Pure Java here. An impure Java program
deliberately uses some platform dependent feature and so immediately
becomes non-portable. An example would be making explicit calls
to Core Audio or Core Midi rather than using their Pure Java
equivalents.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Java and CoreAudio
      • From: David Duncan <email@hidden>
References: 
 >RE: Java and CoreAudio (From: "jez wain" <email@hidden>)
 >Re: Java and CoreAudio (From: Brian Willoughby <email@hidden>)
 >Re: Java and CoreAudio (From: Bob Lang <email@hidden>)
 >Re: Java and CoreAudio (From: David Duncan <email@hidden>)

  • Prev by Date: Re: Java and CoreAudio
  • Next by Date: Re: Java and CoreAudio
  • Previous by thread: Re: Java and CoreAudio
  • Next by thread: Re: Java and CoreAudio
  • Index(es):
    • Date
    • Thread