marcelo Contributor


Joined: 10 May 2008 Posts: 155
|
Posted: Fri Mar 20, 2009 2:29 pm Post subject: MCI CD-Player Problems |
|
|
Hi, i´m making a CD-Player in a module of a program and i have problems with it....
The original program was writen during vacations in a notebook and it worked perfect.
In other PCs the program works bad.
Basically is a CD-Player with Play, Pause, Stop, Prev, Next, Eject commands.
I have the following problems.
When i press Stop button the position counter start to run faster, if i press it again it turns to random positions... but never stop. The only way to stop it is to press play...
Is it a possible hardware dependant problem? Because in the notebook with a DVD reader works fine, at work and in my house with CD-Rom reader and DVD writer drives have this errors.
Any help with this? Other MCI CD-Players in this site returns me similar problems...
VDS version is 5
Notebook: DVD Reader, Windows XP SP3.
Home PC: DVD Writer, Windows XP SP2.
Work PC : CD Reader, Windows XP SP2.
Thanks a lot in advance and very sory for my english...
Marcelo
| Code: |
option decimalsep,"."
DIALOG CREATE,New Dialog,-1,0,269,160
REM *** Modified by Dialog Designer on 20/03/2009 - 00:13 ***
DIALOG ADD,BUTTON,BUTTON1,92,5,64,24,Play
DIALOG ADD,BUTTON,BUTTON2,90,91,64,24,Pause
DIALOG ADD,BUTTON,Button3,93,178,64,24,Resume
DIALOG ADD,TEXT,TEXT1,29,62,,,TEXT1
DIALOG ADD,BUTTON,BUTTON4,127,90,64,24,Stop
DIALOG ADD,BUTTON,BUTTON5,126,177,64,24,Next
DIALOG ADD,TEXT,TEXT2,28,156,,,TEXT2
DIALOG ADD,BUTTON,BUTTON6,128,7,64,24,Prev
DIALOG SHOW
gosub opencd
:menu
wait 0.1,event
goto @event()
goto menu
:Timer
%%Track = @mci(status cdaudio current track)
%%pos = @mci(status cdaudio position)
dialog set,text1,Track: %%track
dialog set,text2,%%pos
goto menu
:Button1Button
%R = @mci(play cdaudio)
goto menu
:button2Button
%R = @mci(pause cdaudio)
goto menu
:Button3Button
%R = @mci(resume cdaudio)
goto menu
:Button4Button
%R = @mci(stop cdaudio)
%R = @mci(seek cdaudio to 01:00:00:00)
goto menu
:Button5Button
%%mode = @mci(status cdaudio mode)
%%Tracks = @mci(status cdaudio number of tracks)
%%Track = @mci(status cdaudio current track)
if @equal(%%Track,%%Tracks)
goto menu
else
%R = @succ(%%Track)
if @equal(%%mode,playing)
%R = @mci(play cdaudio from %R)
else
%R = @mci(seek cdaudio to %R:00:00:00)
end
end
goto Menu
:Button6Button
%%mode = @mci(status cdaudio mode)
%%Track = @mci(status cdaudio current track)
if @equal(%%Track,1)
goto menu
else
%R = @pred(%%Track)
if @equal(%%mode,playing)
%R = @mci(play cdaudio from %R)
else
%R = @mci(seek cdaudio to %R:00:00:00)
end
end
goto Menu
:opencd
%R = @mci(open cdaudio wait)
%%infoIdentity = @mci(info cdaudio identity)
%T = @mci(set cdaudio time format tmsf)
%%tracks = @mci(status cdaudio number of tracks)
%%timeFormat = @mci(status cdaudio time format)
%%startPosition = @mci(status cdaudio start position)
%%totalPlay = @mci(status cdaudio length)
parse "%a;%b",%%totalPlay
%%totalPlay = %a:%b
%%trackLength = @mci(status cdaudio length track 01)
parse "%c;%d",%%trackLength
rem dialog set,text5,Total: %%totalPlay m:s
exit
|
|
|