Solved

Broadcasting live audio to a Java applet

Posted on 1997-05-26
3
837 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
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
jpk041897 earned 100 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now