The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: elmo on April 18, 2011, 04:48:51 AM

Title: Re: How to synchronize music with led
Post by: elmo on April 18, 2011, 04:48:51 AM
I have same question.
I can play mp3 with the following code with MCI
With MCI, I can get speed, get duration, play/ stop a *.mp3 file
but how to get mp3' beat?
what API must I use? I don't have imagine on it.
would you like to give me a clue?
thank you.


invoke MCIWndCreate,
hWin, 400000h,
WS_CHILD or MCIWNDF_NOOPEN or MCI_NOTIFY,
addr szMP3path
mov hMci,eax
pop eax ;For some reason 4 things are pushed onto stack unnecessarily
pop eax ;so they have to be popped off the stack to prevent crashing
pop eax ;Thanks to Ron Thomas for spotting that one!
pop eax
invoke MCIWndGetEnd, hMci           ;GET END OF MP3(in MILI SECONDS)
invoke MCIWndPlay, hMci                ;START PLAY
invoke MCIWndGetSpeed,hMci        ;GET SPEED
Title: Re: How to synchronize music with led
Post by: BogdanOntanu on April 18, 2011, 10:15:41 AM
Elmo,

Please do NOT revive very old topics (from 2005 in this case)

Instead if you have a question please take the time and create your own new topic.
Title: Re: How to synchronize music with led
Post by: elmo on April 18, 2011, 11:12:58 AM
OK BogdanOntanu,
I'm sorry. :red
Title: Re: How to synchronize music with led
Post by: dedndave on April 18, 2011, 01:18:41 PM
it is best to create a new topic, and provide a link to the old one, if desired   :U