Arkie
Javaforums.net Admin
Senior Member
Reputation: 16
Developer @ Javaforums.net
Offline
Posts: 2593
Referrals: 13
|
 |
« on: August 26, 2007, 07:43:23 PM » |
|
GeSHi (java): /*-------------------------------------------------------------------------- // Author List: // deAppel <Creator> // // Description: // Play audio file using sun.audio package // // Environment: // This software was developed using Eclipse and Java 1.6 // // Copyright Information: // Copyright (C) 2007 <Institution><None> // Ark de Appel www.engineeringserver.com // //----------------------------------------------------------------------*/ import java.awt.Container; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.FileInputStream; import java.io.IOException; import javax.swing.JButton; import javax.swing.JFrame; import sun.audio.AudioPlayer; import sun.audio.AudioStream; boolean stop = true; public PlayAudio(){ button.addActionListener(this); c.add(button); setTitle("Play audio"); setSize(200,100); setVisible(true); } try{ AudioPlayer p=AudioPlayer.player; AudioStream as = p.start(as); } } public static void main (String[] args ){ PlayAudio PA = new PlayAudio(); } }
Created by GeSHI 1.0.7.20
|
|
|
|
|
Logged
|
|
|
|
Koâk
Member
Reputation: 0
Offline
Posts: 13
Referrals: 0
|
 |
« Reply #1 on: June 11, 2009, 12:41:31 PM » |
|
could not create audio stream from input stream what file extensions does this support? I'm using MP3 Thanks, Koâk 
|
|
|
|
|
Logged
|
|
|
|
Arkie
Javaforums.net Admin
Senior Member
Reputation: 16
Developer @ Javaforums.net
Offline
Posts: 2593
Referrals: 13
|
 |
« Reply #2 on: June 11, 2009, 12:52:59 PM » |
|
could not create audio stream from input stream what file extensions does this support? I'm using MP3 Thanks, Koâk  Woah, thats quite an old topic. I believe *.au files. If you want to play MP3's take a look at the JMF (Java Media Framework) Take a look here with example code to play mp3 files. http://www.engineeringser...p3javadecoder-t298.0.html
|
|
|
|
|
Logged
|
|
|
|
Koâk
Member
Reputation: 0
Offline
Posts: 13
Referrals: 0
|
 |
« Reply #3 on: June 11, 2009, 12:53:59 PM » |
|
Allright, I'll take a look ^^, Thanks!
|
|
|
|
|
Logged
|
|
|
|
Arkie
Javaforums.net Admin
Senior Member
Reputation: 16
Developer @ Javaforums.net
Offline
Posts: 2593
Referrals: 13
|
 |
« Reply #4 on: June 11, 2009, 12:56:05 PM » |
|
Allright, I'll take a look ^^,
Thanks!
Np, nice to have you here. I also noticed you are new so uhm, welcome to javaforums.net 
|
|
|
|
|
Logged
|
|
|
|
Koâk
Member
Reputation: 0
Offline
Posts: 13
Referrals: 0
|
 |
« Reply #5 on: June 11, 2009, 12:58:40 PM » |
|
Np, nice to have you here. I also noticed you are new so uhm, welcome to javaforums.net  Yeah, thanks!  btw, a small question, do you own this forum? and another one: are you dutch? I am ^^,
|
|
|
|
|
Logged
|
|
|
|
Arkie
Javaforums.net Admin
Senior Member
Reputation: 16
Developer @ Javaforums.net
Offline
Posts: 2593
Referrals: 13
|
 |
« Reply #6 on: June 11, 2009, 01:03:43 PM » |
|
Yeah, thanks!  btw, a small question, do you own this forum? and another one: are you dutch? I am ^^, Yes i'm one of the admins, and yes im also from the netherlands but this is an international community for java developers (though we also have .NET boards) so we post in english. How you found this forum?
|
|
|
|
|
Logged
|
|
|
|
Koâk
Member
Reputation: 0
Offline
Posts: 13
Referrals: 0
|
 |
« Reply #7 on: June 11, 2009, 01:06:01 PM » |
|
Yes i'm one of the admins, and yes im also from the netherlands but this is an international community for java developers (though we also have .NET boards) so we post in english.
How you found this forum?
Allright, I like English  I found this forum via Javaprogrammingforums.com, someone there posted something that I read and in his signature was the link to engineeringserver.com and via that forum I found this forum xD long story 
|
|
|
|
|
Logged
|
|
|
|
Arkie
Javaforums.net Admin
Senior Member
Reputation: 16
Developer @ Javaforums.net
Offline
Posts: 2593
Referrals: 13
|
 |
« Reply #8 on: June 11, 2009, 01:09:26 PM » |
|
Allright, I like English  I found this forum via Javaprogrammingforums.com, someone there posted something that I read and in his signature was the link to engineeringserver.com and via that forum I found this forum xD long story  Ah, those guys banned the account of one of our staff members because they couldn't take it that we were having more post/members i think and probably better java discussions than at their site. Atleast thats what i was told after he got a "banned" message for no reason when trying to login.
|
|
|
|
« Last Edit: June 11, 2009, 01:11:25 PM by HappyFace »
|
Logged
|
|
|
|
Koâk
Member
Reputation: 0
Offline
Posts: 13
Referrals: 0
|
 |
« Reply #9 on: June 11, 2009, 01:10:44 PM » |
|
Ah, those guys banned the account of one of our staff members because they couldn't take it that we were having more post/members i think and probably more higher end discussions. Atleast thats what i was told after he got a "banned" message for no reason when trying to login.
Allright, I'm just happy that I found this forum 
|
|
|
|
|
Logged
|
|
|
|
Arkie
Javaforums.net Admin
Senior Member
Reputation: 16
Developer @ Javaforums.net
Offline
Posts: 2593
Referrals: 13
|
 |
« Reply #10 on: June 11, 2009, 01:12:52 PM » |
|
Allright, I'm just happy that I found this forum  =) , we have a few other members here that ditched their forums and joined here as well but i forgot their members names. I'm sure you will notice their usernames here if you are on their forums as well. As for me, i don't go there. //edit i don't think this conversation has much to do with playing mp3 files so lets continue the convo somewhere else (in the general chat or something) if you want?
|
|
|
|
« Last Edit: June 11, 2009, 01:14:41 PM by HappyFace »
|
Logged
|
|
|
|
Koâk
Member
Reputation: 0
Offline
Posts: 13
Referrals: 0
|
 |
« Reply #11 on: June 11, 2009, 01:13:34 PM » |
|
Allright, I hope this community gets bigger 
|
|
|
|
|
Logged
|
|
|
|
Arkie
Javaforums.net Admin
Senior Member
Reputation: 16
Developer @ Javaforums.net
Offline
Posts: 2593
Referrals: 13
|
 |
« Reply #12 on: June 11, 2009, 01:15:32 PM » |
|
Allright, I hope this community gets bigger  Well, you joined so thats the first step. May many others follow you 
|
|
|
|
|
Logged
|
|
|
|
Verlor
Junior Member
Reputation: 0
Offline
Posts: 1
Referrals: 0
|
 |
« Reply #13 on: November 16, 2009, 03:58:10 PM » |
|
hey man thank you!! thats very simple and useful 
|
|
|
|
|
Logged
|
|
|
|
Arkie
Javaforums.net Admin
Senior Member
Reputation: 16
Developer @ Javaforums.net
Offline
Posts: 2593
Referrals: 13
|
 |
« Reply #14 on: November 16, 2009, 07:05:12 PM » |
|
hey man thank you!! thats very simple and useful  Thanks, glad to help out. I only wish that there are more people active here.. :/
|
|
|
|
|
Logged
|
|
|
|
|