java - Loop a sound file from a certain point? -


suppose have sound file wish play in manner:

  1. start 0:00 mark.
  2. when sound file ends, replay 0:30.00 mark.

essentially, wish song play 0:00 0:30, loop 0:30 end.

how do this?

usually, when playing audio files, use audioclip.

audioclip audio = applet.newaudioclip( this.getclass().getresource( "..." ) ); audio.loop(); 

it's because of bad experiences loading audio file when project packed .jar file. if method recommend uses class, still more happy listen. however, if you've encountered same problem have , know how fix it, please tell me.

you might use clip this, or if clip large, feed bytes directly sourcedataline.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -