My application has two timers. The TMediaPlayer is turned off ontimer 
event. Here is the snipet of source code

procedure TForm1.Button1Click(Sender : TObject);
begin
  ...;
  ...;
  Form1.GetItemData(itemnumber);
end;

procedure TForm1.GetItemData(itemnumber : string);
begin
 ...;
 ...;
  if mediaplayer_ON then
   begin
    Form1.MediaPlayer1.Stop;
    Form1.MediaPlayer1.Close;
    mediaplayer_ON := false;
   end;

  mediaplayer_ON := true;
  Form1.PlayMP3Music;
end;

procedure TForm1.Timer2Timer(Sender : TObject);
begin
  ...;
  ...;
  ...;
  if mediaplayer_ON then
   begin
    Form1.MediaPlayer1.Stop;
    Form1.MediaPlayer1.Close;
    mediaplayer_ON := false;
   end;
end;

The PlayMP3Music is not within a thread object. Initially i didnt 
think it necessary to have it threaded. But now I wonder if that 
might fix it. I may try that in a few days time.
Hope that helps explain the case.

Anu Rang, TotallyFreeEnergy
http://totallyfreeenergy.zxq.net

--- In [email protected], David Smith <[EMAIL PROTECTED]> 
wrote:
>
> Your app requires all those other things installed before it will 
run and it still doesn't run?
> 
>   Maybe it's trying to repeat play? Are you explicitly turning it 
off after it plays once? 
> 
> Dave
> 
> --- On Fri, 7/4/08, Anu Rang <[EMAIL PROTECTED]> wrote:
> From: Anu Rang <[EMAIL PROTECTED]>
> Subject: [delphi-en] A TMediaPlayer Question â€" Error ‘No MCI 
device open’
> To: [email protected]
> Date: Friday, July 4, 2008, 12:25 PM
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>     
>             My Delphi7 application which uses TMediaPlayer to play 
resourcestream 
> 
> from a MP3 file compiles and executes OK. The install of it on my 
PC 
> 
> (Windows XP SP2) is also OK. But when I install and try to run the 
> 
> application on another Windows XP SP2 PC I get the infinite loop 
error 
> 
> message `No MCI device open' after the TmediaPlayer had been 
activated 
> 
> and the music played once.
> 
> 
> 
> A search of the internet yielded many such reports on many forums. 
But 
> 
> no solutions that worked for me.
> 
> 
> 
> The application download is at
> 
> http://totallyfreee nergy.zxq. net/Freewares. htm and
> 
> http://totallyfreee nergy.freehoxt. com/Freewares. htm 
> 
> 
> 
> I wonder if anyone here on this forum has had any similar 
experience. 
> 
> Thanks-in-advance for any input..
> 
> 
> 
> Anu Rang, TotallyFreeEnergy
> 
> http://totallyfreee nergy.zxq. net
> 
> 
> 
> 
>       
> 
>     
>     
>       
>        
>       
>       
> 
> 
> 
> 
> 
> 
> 
> 
>       
> 
> 
>       
>       
> 
> 
>       
> 
> [Non-text portions of this message have been removed]
>


Reply via email to