You haven't idiot-proofed the mm3 files let. :D I can crash your program if I edit playlist.mm3 in Notepad.
And oddly, though I'm sure unimportant, I get two instances of mm3 when I try open corrupted playlist. Notice two in the systray.
Printable View
You haven't idiot-proofed the mm3 files let. :D I can crash your program if I edit playlist.mm3 in Notepad.
And oddly, though I'm sure unimportant, I get two instances of mm3 when I try open corrupted playlist. Notice two in the systray.
No, I've not added any idiot proofing as of yet. What did you change to make it crash?Quote:
Originally posted by postitlord
You haven't idiot-proofed the mm3 files let. :D I can crash your program if I edit playlist.mm3 in Notepad.
And oddly, though I'm sure unimportant, I get two instances of mm3 when I try open corrupted playlist. Notice two in the systray.
Not sure why you got two copies running - very strange. Will investrigate.
Your idea about the way to handle lists is interesting. Will give it some thought.
Version 2 is well under way. I have finished all the systray stuff, popup menu and the media playing code. All that is really left to do is to get the playlist working and add the registry reading/setting part.
At the moment it is able to open and play a single MP3 file - much like the very first release of version 1.
The program is compiling to about 44Kb - and this time we don't need any of the VB runtimes! I'm hoping that this won't go up by too much when I add the rest of the stuff.
Memory usage has improved but not significantly yet. Hopefully I will be able to tweak it once it has all the functionality added.
Will keep you posted.
BTW: I had hoped to release the VB code this weekend but have left it at work. Therefore, by the time I have managed to tidy it up and package it, it will be mid-next week before I can post it.
two words:
source code
umm does it use media player?
umm..no, it uses the mciSendString api.... (this was already mentioned)Quote:
Originally posted by MrPolite
umm does it use media player?
Would you believe it. I have just been approached by a media company who wish to include Mini MP3 on an educational CD they are distributing.
WooHoo.
WOO!!
way to go man...make sure they pay u nuff cash tho :D
ummm!!! can you explain?! so it doesnt need an ativeX or anything?Quote:
Originally posted by Tygur
umm..no, it uses the mciSendString api.... (this was already mentioned)
what does mciSendString do? does it ASK windows to play the mp3?:confused: :confused: :confused:
Basically, yes. It doesn't need any OCX's. The Microsoft Multimedia Control (it's an OCX that comes with VB) is a wrapper for this and the other MCI functions. Slaine is just calling it directly, without any OCX's. Does that help any?Quote:
Originally posted by MrPolite
what does mciSendString do? does it ASK windows to play the mp3?:confused: :confused: :confused:
Tygur is spot on, and it's not difficult to do.
Add the declaration for the API function to your project:
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
And a few other declarations
Dim MCIString As String
Dim MCICommand As String
Dim ReturnString As String
Dim CallBack As Long
Then you can do the following operations.
First you open the file:
MCICommand = mciSendString("open MPEGVideo!P:\music\demo.mp3 alias mpeg", ReturnString, 128, CallBack)
Then you can play it:
MCICommand = mciSendString("play mpeg from 0", ReturnString, 128, CallBack)
To stop it:
MCICommand = mciSendString("stop mpeg", ReturnString, 128, CallBack)
And finally to close and unload the file.
MCICommand = mciSendString("close mpeg", ReturnString, 128, CallBack)
1.
Slaine, could you please list all the files that are needed to make this program work (and size), instead of my asking about each one individually?
I found that "Microsoft Multimedia Control 6.0 (SP3)" file, MCI32.OCX, it's 193 kb. I'm curious what the total file sizes will add up to.
2.
PS, common, can't you figure it out?;)What's the first thing it writes to the MM3 file? An Integer. How do you break code that depends on numbers? Shove words there! Put in incorrect numbers!Quote:
What did you change to make it crash?
Lets say i have playlist.mm3 with two files inside.
I change the number "2" to:
- words, 1, 0, -1, it crashes like in picture attached earlier
- 3, it plays the files, then crashes, siting "Media File type or Compression not Supported", which is completely inaccurate
(but I can take a good guess what your code looks like; Case Else...)
3.
PS. I found you can keep opening Mini MP3. Just keep clicking it. I think code to allow only one instance is a good idea.
Slaine is not using MCI32.OCX. I already said that he was calling the API's directly. I'll let him answer the rest of your question though, especially since it wasn't even directed at me..Quote:
Originally posted by postitlord
1.
Slaine, could you please list all the files that are needed to make this program work (and size), instead of my asking about each one individually?
I found that "Microsoft Multimedia Control 6.0 (SP3)" file, MCI32.OCX, it's 193 kb. I'm curious what the total file sizes will add up to.
The more I read this thread, the more I am tempted to write my own similar mp3 player. It's not that complicated. This is actually a very simple program.
Ahh, my lacking knowledge of APIs is showing. I barely understand the concept... I'll keep my API questions out of this thread.
I'll save you the effort - I'm just in the process of tidying up the source code. I'll be posting it very very soon, then you can see exactly how it works - but as you say it is, by definition, a very simple program.Quote:
The more I read this thread, the more I am tempted to write my own similar mp3 player. It's not that complicated. This is actually a very simple program.
The only dependencies at the moment are the VB runtime file (MSVBVM60.DLL) the common dialog ocx (COMDLG32.ocx) and that windows media player is installed.
I have just done a quick installation build in InstallShield and it has created a setup, including all required files and it comes out at about 1.3Mb.
Tygur suggested earlier that I could remove the dependency on the common dialog ocx, which would further reduce the size.
Well the fact is, I am not committing to changing the current VB version in any way. This also goes for fixing the problems with the playlist causing the program to crash.
My efforts are now focused on finalising V2.
V2 is written in C++, it is a single file, requiring no other support dll's to be installed. It has improved playlist parsing and a few (and I do mean only a few - as in 2) extra features.
It is virtually complete - the only thing left for me to do with it is finish off the playlist code - (about 2 hours of work).
Update 20 December 2002
Well I finally got there :)
I know it has been a long time but I got side tracked ;)
Version 2 has just been released and is available from the website www.minimp3.com.
Feel free to upgrade.
As promised I am releasing the source code for v1 now that v2 is out.
Use it or not - it's up to you :)
Mini MP3 Source Code v1
Wow, you made a really cooll pregram Slaine. But there is one thing I think you could change.... you should give it the ability to skip songs, since I have alot of dowloaded songs and I dont pick em out one by one, I just choose them all. Another good feature would be to add a pause button. But, I understand if you dont want to do that, it might make the file bigger, and then you'll lose your claim to fame. Whoops, scratch that, just downloaded version 2, sorry!!! However, a pause button would be nice.....
Only problem with this program is you have to have VB installed for it to work... Should put it in an Install package.
Version 2 has no dependency on the VB runtime files. It's written in C++Quote:
Originally posted by Arc
Only problem with this program is you have to have VB installed for it to work... Should put it in an Install package.
WEll it wouldnt run casue i dont have Cmddialog.dll installed. I know that comes with VB... I am running win XP Pro.
Is it possible to set the video window to stay on top?
Pete
So it needs the c++ runtimes then? I dont have those installed. Where can I get those?Quote:
Originally posted by Slaine
Version 2 has no dependency on the VB runtime files. It's written in C++
Thanks
Tom
Try installing windows ;)Quote:
Originally posted by TomGibbons
So it needs the c++ runtimes then? I dont have those installed. Where can I get those?
Thanks
Tom
In short No. In Long probably but I'm not going to bother :)Quote:
Originally posted by Peter1
Is it possible to set the video window to stay on top?
Pete
Oh guess I do have the then :D Thats nice and easyQuote:
Originally posted by Slaine
Try installing windows ;)
i will give you a million dollars* if you give me the source
*note: the million dollars will be entirely composed of monopoly money, and it cannot be promised it can be delivered outside of my house
No Problem, I have printed the source code - If you come and pick it up with your million dollars I'll let you have it ;)Quote:
Originally posted by Skitchen8
i will give you a million dollars* if you give me the source
*note: the million dollars will be entirely composed of monopoly money, and it cannot be promised it can be delivered outside of my house
Seriously though - although I don't want to give away the entire source code, if you tell me which bit of it you are interested in I will happily let you have that part of it.
This thing will only work if you have VB installed.. other wise you'll have missing dll's..such as common dialog..atleast on WinXp.
Arc,Quote:
Originally posted by Arc
This thing will only work if you have VB installed.. other wise you'll have missing dll's..such as common dialog..atleast on WinXp.
This just isn't true - for several reasons.
You do not need to have VB installed. The program IS dependent on comdlg32.dll BUT this is a standard windows system library. It is installed by default when Windows XP is installed. I have just done a completely clean XP install on a machine and then tried to use Mini MP3 and it worked perfectly. I also checked and comdlg32.dll was already present.
The ocx version of this library is used by VB programs that use the common dialog control - but because I have written it in C++ I am directly accessing the dll via API calls, hence no dependency on VB runtimes.
All I can think is that you are not using the latest version of Mini MP3 and are having problems with the VB version (1) of the program.
The latest version is 2.0.0.2 and can be downloaded here:-
http://www.minimp3.com/downloads/miniMP3_V2.zip
I'd be interested to hear how you get on with it.
well, i can do most of it on my own if i try hard enuff, but i wanted to get it and change it, specifically adding the code to keep the video window on top n stuff like that. Although it might help if you could release the module you use to play the video and MP3's... i used to have one but i dunno where it went, and i haven't messed with MCI in a long time.Quote:
Originally posted by Slaine
No Problem, I have printed the source code - If you come and pick it up with your million dollars I'll let you have it ;)
Seriously though - although I don't want to give away the entire source code, if you tell me which bit of it you are interested in I will happily let you have that part of it.
BTW: arc i'd like to see just about any program on your system run if you don't have the commondialog control. Quite a few programs use it, and won't function without it (notepad for example) are you even running windows??
That must have been it. I used the new link and had no problems.
It works too :) But imo its just not an mp3 player without some sort of interface... you know so you can drag the scroll bar back and forth and some volume controls etc...
Glad you got it working.Quote:
Originally posted by Arc
That must have been it. I used the new link and had no problems.
It works too :) But imo its just not an mp3 player without some sort of interface... you know so you can drag the scroll bar back and forth and some volume controls etc...
Your comment is a valid one but I never ever ever ever have used the scroll bars in winamp to do what you describe and as such have no need for that functionality - like wise you can control the volume using the indows control so no need to repeat it in the MP3 player.
The original reason for creating this thing was just to create an almost invisible player that just played tracks - no fancy control or interface or repeated functions. I never set out to create a clone of winamp - that would have been silly, instead i wanted to create a player that contained only the options I used.
It does just that and as I have always said - If you like it, use it otherwise don't :)
I realize it's been over a year since you dealt with the this subject at this forum (thanks for the mini player, by the way), but this is a question I'm sure you have a good answer to. I'd like to add various sounds (short .wav files set in the code, not user defined) to accompany the pressing of buttons in my projects. Do you know of an easy method?
Thanks
my guess would be that the easiest way would be to use the windows media player control, although interfacing with MCI is the best way to play sounds.