Path: csiph.com!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: i want to play mp3 for infinite time Date: Sun, 06 May 2012 21:00:42 -0700 Organization: albasani.net Lines: 24 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 X-Trace: news.albasani.net fiBBEoNMW3sVCDJ9BszBqc0fplP+Ca6lvOENBre5JPXWQmn1LlCE49sHk0E8NTwAMCb4Oio46hMa6uSKpXyJhfsnP6Ikz2HFkuM8b0JAkYE8aX0yDmzTGs8PEW4bfkkY NNTP-Posting-Date: Mon, 7 May 2012 04:00:44 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="UHyuDAEPxp6fqGM+CsBwAda2Ku8Ti6R9IyuS0b5VX8+oYd3NTZHaCEytq5xZDEmDKmYkH/gaYku7TYN73wDKyZsILvn+mdBt3YYzSWXpAvSR1yaNo3GN0FNdeoeXUE2o"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 In-Reply-To: Cancel-Lock: sha1:bijnyN4l6ArcKA946xR4PbRg7rY= Xref: csiph.com comp.lang.java.programmer:14349 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. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg