AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

suonare una clip

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java (Italian)
View previous topic :: View next topic  
Author Message
nello
Guest





PostPosted: Thu Feb 26, 2004 4:48 pm    Post subject: suonare una clip Reply with quote



salve io volevo solo suonare un file wav....
mi sono letto la documentazione della sun e sono giunto a scrivere queste
linee di codice che compilano ma non funzionano.
ho un errore quando faccio l'assegnazione alla variabile line.
qualcuno mi sa dire come posso fare allora a suonare un file?
grazie in anticipo

private TargetDataLine line;
try{
AudioFormat format = AudioSystem.getAudioInputStream( new File( new
File( "" ).getCanonicalPath( ) +

"/presa.wav") ).getFormat( );
line = ( TargetDataLine )AudioSystem.getLine( new DataLine.Info(
Clip.class, format ) );
line.open( format );
} catch( LineUnavailableException ex ) { }
catch (Exception ex) { }
line.start( );



Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.