1. MovieDuration = returns the length (in milliseconds) of a movie (including .mp3 files). Perhaps MovieInfo could be expanded to include this.
2. MovieStatus needs to be expanded to return a status for audio files (such as .mp3 files) in addition to video files.
Jason
improvements for movie
Re: improvements for movie
I know this is the "Feature Requests and Wishlists" section and your request
is perfectly valid but I thought I'd let you know that LoadMovie() kind of gives
you full access to DirectShow (on windows). Don't know if this helps...
http://www.purebasic.fr/english/viewtopic.php?t=13282 (old code, old PB)
is perfectly valid but I thought I'd let you know that LoadMovie() kind of gives
you full access to DirectShow (on windows). Don't know if this helps...
http://www.purebasic.fr/english/viewtopic.php?t=13282 (old code, old PB)
Good programmers don't comment their code. It was hard to write, should be hard to read.
I currently use LoadMovie() but I am need a way to put a list of songs in an array and play each song in the array one after another one at a time. I am having trouble starting subsequent songs after the first because I can find no way of knowing when the first song has finished.
If these new commands were available, especially the MovieStatus() command, I could do this easily.
Jason
If these new commands were available, especially the MovieStatus() command, I could do this easily.
Jason
-
- Enthusiast
- Posts: 469
- Joined: Sun Mar 16, 2008 9:18 am
Re: improvements for movie
From the manual:
So how is the command supposed to know when a song is finished if it has no frames for a reference?Note: Be careful with this function when using sounds (e.g. MP3) as no pictures (frames) exist.
My point exactly. There is no way to tell if an audio file has finished playing. It would be nice to have a command which detects when an audio file has finished playing.
It would also be nice to have another command that gives the length of an audio file (in milliseconds).
Just two ideas that would make the language better.
Jason
It would also be nice to have another command that gives the length of an audio file (in milliseconds).
Just two ideas that would make the language better.
Jason
Re:
I was going to have an MP3 player in my app but then discovered that
there's no way to know when a song has finished (because MP3s don't
have video frames, and thus the MovieStatus() command can't help).
Has anyone ever found a solution for this, yet? There is a procedure
in the forums for "IsSoundPlaying" (or something) but that's only for
WAVs and not MP3s.
Actually, it looks like the code here might have the solution:
http://www.codeproject.com/KB/audio-vid ... Winmm.aspx
Have to have a play and see what I come up with. But a native way
to know when an MP3 (or any given media file) has finished would be
the best outcome.
there's no way to know when a song has finished (because MP3s don't
have video frames, and thus the MovieStatus() command can't help).
Has anyone ever found a solution for this, yet? There is a procedure
in the forums for "IsSoundPlaying" (or something) but that's only for
WAVs and not MP3s.

Actually, it looks like the code here might have the solution:
http://www.codeproject.com/KB/audio-vid ... Winmm.aspx
Have to have a play and see what I come up with. But a native way
to know when an MP3 (or any given media file) has finished would be
the best outcome.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Re: improvements for movie
I remember, that there were problems (= I had problems with Songs longer than 3:33 min or so) , but I just tried some mp3-Files again with 4.51RC1 x86 (XP and Win7)...
MovieStatus seems to work also with mp3-Files now...
...will test more...
MovieStatus seems to work also with mp3-Files now...
...will test more...
PureBasic for Windows