News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

tiny mci multimedia player

Started by avcaballero, July 28, 2014, 06:25:24 AM

Previous topic - Next topic

avcaballero

Hello. I'm trying to make a tiny mci multimedia player. This is the very-very-very first version though operative. You can open a midi-mp3-wav-etc file and then play it, also stop and reanude it, and can demand a looping play of it. At least en W7 works fine... more or less. I need to insert a beep at the end of the file to reanude it from the begining, need to fix it.

I want to implement it a basic ... don't know how to name it... graphic bar guided by the music?. One status bar (I think it is not so hard), and one volume bar (not hard neither). And an avi player (not hard). The more difficult could be the first one.

In short. Any info about that?

By the way, 512Kb of size is a bit low limit...  :redface:

Regards,
alfonso

dedndave

you can probably just use a "slider" aka trackbar - somewhat similar to a scrollbar

http://msdn.microsoft.com/en-us/library/windows/desktop/bb760149%28v=vs.85%29.aspx

if you want to use CreateWindowEx, you can use the predefined system class:

szTrkBarClass   db 'msctls_trackbar32',0

TouEnMasm

A very good one is VLC.His author said that he is good because he don't use API as you do.
http://msdn.microsoft.com/en-us/library/windows/desktop/ff819076(v=vs.85).aspx
The mediaobj.h(.sdk) is part of the windows sdk
Perhaps wincodecsdk.h(.sdk) could help in this.
 
Fa is a musical note to play with CL

Siekmanski

You need direct access to the audio buffer to create a sound bar or oscilloscope. Is this possible with the MCI api ?
You can do this if you use ACM-codecs.
Creative coders use backward thinking techniques as a strategy.

avcaballero

Hello, thank you all for your responses. I've been a few days on hollidays and didn't watch them. I've had few time to work on the program, but it already has several interesting features: we already know how long is the file we are playing and for what position we are, hence it would be easy to add a track bar.

In the other hand, it can play several formats, including films avi, you can check it. Also can play in a loop if you click in the 8th button (loop icon) or just one time if you click it once again.

Nevertheless, i have to control better when the file ends playing and polish many things.

Also, i'd like to add an oscilloscope bar, but this seems to be not so easy to implement, though this is a main point to me because, controlling this, can be used in demos for sincronizing graphics and sounds.

My objective is not to make a multimedia player in the usual way, just play a bit with sound programming.

I think that it is amazing you can make a simply (but functional) multimedia player in a few kilo bytes.

Regards

dedndave

a spectrum analyzer would be a nice feature (rather than an oscilloscope)
i bet Marinus has some code for that   :t

Siekmanski

Ever thought of using directsound ?
It's easy to set up and you have full control of the sounddata in the sound buffers.
With a bit of timing stuff you can draw a scope or whatever and synchronise graphics etc.

Lately i was busy programming a (ACM codec) mp3 player, wich is a pain in the a**. There are so many corrupt mp3 files that crashed my proggy.
So i made a little proggy to analyze the mp3 files to find the errors and correct them on the fly so they could play in my proggy or else skip the song.

It's fun to watch graphics that reacts to the music.  :biggrin:
Creative coders use backward thinking techniques as a strategy.

avcaballero

Hello. Track bars added but not fully functional, and any other minor changes.

Regards

Gunther

Alfonso,

works fine under Windows 7-64. The language is Spanish, isn't it?

Gunther
You have to know the facts before you can distort them.

avcaballero

Yes, it is.

Flat buttons seem to be more stylish than 3d ones  :icon_rolleyes:

FORTRANS

Hi,

   Works for MP3 and WAV files under Windows 2000.  An AVI
file opened, but did not play (I think).  Looks a bit odd though.
Attached is a screen shot of it.

Cheers,

Steve N.

Siekmanski

Mp3 Wav and Avi play well under Windows 8.1 64 bit.
Creative coders use backward thinking techniques as a strategy.

avcaballero

My aim is to make a multimedia player as tiny as i can, doing the minimum win api calls, so i made icons using system fonts webdings and wingdings, but i can see that not everybody has them...  :biggrin: Systems fonts size can take effect too  :biggrin:

:( :redface: :(

One way to fix it should be using images, but this will increase the exe size...

The aspect of the window should be this one (didn't show the imagen in the zip???):

Thank you for your help,
alfonso

sinsi

Playing so far: avi, wmv, wma, mp3, mp4, flv, aif
Windows 8.1 Pro with Media Center, also shark007's codec pack probably helps :biggrin:
🍺🍺🍺

avcaballero

#14
Thank you sinsi. Everybody sees the player as i attached before? I see that FORTRANS can not, maybe he has not any of the fonts used... It should be a pity to have using images instead of fonts, though only increases in 11 kb the size of the exe, maybe even less. :idea:

Regards