Path: csiph.com!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Knute Johnson Newsgroups: comp.lang.java.programmer Subject: Re: i want to play mp3 for infinite time Date: Sun, 06 May 2012 21:46:51 -0700 Organization: A noiseless patient Spider Lines: 29 Message-ID: References: <22351436.624.1336324248195.JavaMail.geo-discussion-forums@pbctc10> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 7 May 2012 04:46:52 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="mz/LDSJwiWnk3Jnnqg7x+Q"; logging-data="25230"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1888Hwsoz2ELq5AhTR4ATL/" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 In-Reply-To: Cancel-Lock: sha1:ubMM5i0rv+WVsWuY+6fBJ8fOmoI= Xref: csiph.com comp.lang.java.programmer:14351 On 5/6/2012 9:00 PM, Lew wrote: > Gavino wrote: >> chetan1991 wrote ... >>> I want to play my mp3 file for infinite times, >>> help me to play this for infinite time in loop. >> >>> public void controllerUpdate(ControllerEvent e) >>> { >>> if (e instanceof EndOfMediaEvent) >>> { >>> playMP3.stop(); >>> playMP3.close(); >> >> Instead of closing the player, you should do this: >> playMP3.setMediaTime(new Time(0)); >> playMP3.start(); > > Also, follow the Java naming and source indentation conventions. > > > He's going to need the Java MP3 plugin and I can't find it on Oracle's website. Any idea where it is now? I've still got a copy and it works fine for MPEG2 layer 3 audio files even for JavaSound. -- Knute Johnson