?
Solved

Broadcasting live audio to a Java applet

Posted on 1997-05-26
3
Medium Priority
?
864 Views
Last Modified: 2012-06-22
I'm working on a project for satelittes
communications at the Sherbrooke University (see
http://www.dmi.usherb.ca/~barbeau/Radio/index.html)
and i want to know something.
I want to broadcast some audio stream live (.au
format from the "/dev/audio" of a PC, whit SB
card, under Linux) on Internet with my own server,
so i'm looking for the better way to do this.

There is the context:

            microphone on a PC
                  |
                    |
      My server (broadcasting not only audio)
                  |
                  |
                Internet
                  |
                  |
      The client (could be on a different plateform)
                  |
                  |
                speakers      


Maybe there is a way to do this whit JAVA??? Some Java fans
talking about a continus.audio.data.stream class in the Sun.audio package. A guy from Intet Customer Support had
send me this last week:

         "The current release of Java Media Framework
        (JMF)does not support real-time streaming file
       types."

, so we could not use the JMK. Maybe there's a other
way????
 
On the orther hand, if i could not take Java, it certainly
exist a ohter posibility.
For now, my Server not broadcast audio stream to the client. The client is a Java applet and he receive some information
about the satellites position.
May be, if the client is the RealAudio Player,
the Player can read the audio Stream from
a port and put it to the speaker???
And make a relation
between my Java client and the RealAudioPlayer????
I'm talking about RealAudio Player, maybe there is something better????

                  Thanks

                  Jean-Marc Desbiens
                  DESBIENS@DMI.USHERB.CA
0
Comment
Question by:desbiens
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
jpk041897 earned 200 total points
ID: 1220901
As I see it, you currently have 3 option available to you under Java.

1. You could create your own set of classess using UDP to implement streaming AUDIO.  

Although its a fairly good option, it does imply a lot of work since you would have to integrate your real time sound source to a Java App to be able to use this.

Also, Java's socket level support is currently quite limited, and though you can build on it using factory classes, documentation on the subject is still quite limited..

To see the basics of UDP programming over JAVA see:

http://www.mcp.com/que/et/se_java2e/24javafi.htm

and

http://www.inf.uni-hohenheim.de/top/java/tutorial/networking/datagrams/index.html


2.- Use RealAudio. Also a verry good option, RA's latest version allows for streaming audio and video withe stereo quality over a 28.8K line and CD quality over ISDN.

 Unfortunatley, there is a bug in the Java  classes of the current version that do not allow it to work well under netscape from a straight Java application. Works fine under Javascript so you would have to control the audio in one frame and the applet form another to make it work properly.

ActiveX support works fine though.

3.- Use Intel Media for Java. See:

http://www.intel.com/ial/jmedia/index.htm

for complete specs. Looks like a good product, (almost as good as RA) but is a lot younger (and therfore possibly buggier). It has the advantage that it runs over pure java. An additional disadvantage is that the platform set supported is still much smaller than RA and, as you stated in your message, straming support is not yet implemented. C.f.:

http://www.intel.com/ial/jmedia/Docs/JMFramework/JMFrameworkTechnicalFAQ.htm#AT02


Your best solution will probably be RA, inspite of the bug and the fact that users have to download additional software to use it, because it was designed specificaly for applications of the type you describe in your diagram.


Let me know if you want additional details on any (or all) of the proposed solutions.



0
 

Author Comment

by:desbiens
ID: 1220902
It's looking good, but I dont have experience in Java
programming, so it's difficult for me to make a good evaluation
of the Java solution. It's already the best answer i'd received.

I'm realy interesseted to know a little bit more about the
solution 1). Is it possible to find to example about this?

For the solution 2, RealAudio is the easy way to deal with the
countinus audio stream, but it's a little bit expesive:
 
>----------RealAudio Server ----------
>- Serves 20 simultaneous end user streams
>- License: $1421.25
>- Annual Support & Upgrades: $746.25
>- Total: $2167.50
>----------RealAudio Server ----------
>- Serves 50 simultaneous end user streams
>- License: $3746.25
>- Annual Support & Upgrades: $746.25
>- Total: $4867.50

Intel is probably suppose to give a new version of the Java Media
FrameWork for next septembre. May be it's gona support the real-time continus streaming??

                              Thanks
                              Jean-Marc Desbiens
                              DESBIENS@DMI.USHERB.CA

0
 
LVL 6

Expert Comment

by:jpk041897
ID: 1220903
Regarding JMF, they state it will be supported in a future version, that means it might or might not be supported in ther next version.


Regarding UDP (solution 1): Your comment starts going out of the scope of your original question (which can confuse a later user accesing this for info) so why don't you e-mail me at:

jkelleghan@usa.net

and we can carry on the discussion frome there. (that also goes for any future interested party).
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month12 days, 23 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question