Page 1 of 1

DeMp3 Lib

Posted: Sun Dec 04, 2005 1:56 am
by Baldrick
Hi all,

I have made a very simple little Lib for easy { lazy } control of Mp3 files.
It will load, play, stop, pause, etc these files and offers ability to return time string values as millisecond, hh:mm:ss or hh:mm:ss:ms depending on option used. It also will give return values for volume, balance and speed using mp3 files. Return values for most commands use direct mci returns so MCIERR can be used for error handling.
Included is Help file and full source.

Click to Download until release on PureArea

Hope some of you may find this useful.

Regards,
Baldrick

Posted: Sun Dec 04, 2005 5:11 am
by rsts
Have to check this out.

Thanks for sharing it.

Posted: Sun Dec 04, 2005 9:55 am
by blueznl
will you release source?

Posted: Sun Dec 04, 2005 10:51 am
by Baldrick
blueznl wrote:
will you release source?
Source is included with the download.
My coding may be far from being the best blueznl as I am at best just a bit of a novice / hobbyist, but it is there for you to do with as you please, even if it is only as a bit of a reference for you. :)
My purpose in writing this Lib was actually more as a practice thing. Mp3 control just seemed like a nice little project for myself.

Posted: Sun Dec 04, 2005 11:03 am
by blueznl
hey no prob, i'm probably more of an amateur than most people in here, i just have very strong views on things :-)

Posted: Sun Dec 04, 2005 1:11 pm
by Gansta93
If sources are included, why not publish this on PBOSL?

Posted: Mon Dec 05, 2005 10:43 am
by Baldrick
@Gansta93,
I see no problem with that if the ppl here think it is worthwhile for inclusion of such a simple Lib. I would like to make sure everything is nice & stable & bug free before I do though.
I have found 1 small error in my help documentation which I will fix very shortly.
Documentation reads as : Result=DeMp3Stop(TrackNum)
Options:
0=stop and return to start of music file
1=stop and remain at current position in music file

Should read as : Result=DeMp3Stop(TrackNum,Option)
Options:
0=stop and return to start of music file
1=stop and remain at current position in music file
So far only very minor.. :)

Posted: Mon Dec 05, 2005 12:17 pm
by dmoc
Thanks for the lib, works great! In the chm example there are a couple of "DeMusic..." that need replacing eith "DeMp3...".

Posted: Mon Dec 05, 2005 12:40 pm
by Baldrick
Thanks dmoc,
Fixed. only found 1 instance "DeMp3Pause", so getting close now I think
Btw, DeMusic was my original name for this lib, but I changed it to avoid confusion with format support..

Posted: Wed Dec 07, 2005 12:09 pm
by Baldrick
Sitting around last night I decided to see how this lib would react to some video file formats. The results I got were better than I had expected in that with the formats I tried, not only did I get audio with volume, balance, etc control, but also the mci actually opened a default window for me detached to the playing window but fully synch'd with it. { Video was not at all what I had intended for this lib btw, hence the reason for not specifying hwnd in any parameters which I will now probably do in a later version after PB4 comes out seeing as that should be fairly soon. } Speed was about the only command ignored by the video as is.

For those of you who have d/l'd this Lib, change the file requester in the example file to select " wmv,avi,mpeg, asf. to test as below.

Code: Select all

FileT1$=OpenFileRequester("Choose Track 1 song to play","","Mp3|*.mp3|Wav|*.wav|Video|*.asf;*.wmv;*.mpeg;*.mpg",2)
I have also updated help file now to fix a couple of small errors in it & also now reflects my test results with video formats if anybody wants to d/l again to update. { no actual changes within the Lib its self though }