Message board for the users of flat assembler.
> Windows > music player
when i first tested the demos of fasmw, i tryed to modify a little the beer demo, in order to play a mp3 on a condition (hit the cancel button), and it works quite fine, only a problem with the stop of the mp3, it plays until the end of the song.
i suppose it is a minor thing to do, but when i look closer to my needs about a music player, i see i really need the oscilloscope view of the entire song, like in every good music softwares.
but i don't need to have a very complicated music player, just a tool bar with the music buttons, a sort of playlist, and the songbar with the oscilloscope of the entire song, with a cursor.
then, i really wonder, what kind of lib i can use for this.
i think about opengl because it is a verycool lib, and will let the music player become a psychedelic music player, using some image viewing and graphic effects to animate the song.
but before graphics, just have the music playback is essential of course.
then, i propose to discuss about the interface and the structure of this application.
compile in a very little executable file, with no external dependencies other than the lib used to code it.
just use libs compatible with win9x and that don't need to install something.
play WAV, MP3, OGG, MIDI
be very fast:
to play and change music
to be coded before december 22th 2012.
anybody here have something like an help to give in order to code this music player?
it will look like this:
|06 Jul 2011, 11:44||
For playback mciSendStringA API
For listing files FindFirstFile and FindNextFile APIs
Or you could use the open file dialog GetOpenFileName API
For visualizing the data it gets a little tricky. You need the sound data in PCM format (bytes/words that represent the amplitude of the wave).
I high pitched sound PCM would be like
0 5 10 20 30 20 10 5 0
A low frequency sound PCM would be
0 1 2 3 4 5 6 7 8 9 8 7 6 5 4 3 2 1
You'd plot it on the screen or in a graphics engine like the windows sound recorder does.
You could use a library like LAME or other library to convert MP3 to WAV then you'd be able to play the sound in OpenAL and visualize it with OpenGL
mp3 to wav libmad
open al play wav
|06 Jul 2011, 13:14||
about the signal representation, lets say it will use only the envellope of the song.
for very short files like samples, the signal will be displayed dot per dot.
this is the scope part.
thank you for the playback part keywords, now i will learn more about this openAL thing, i hope it is something like win9x compatible.
then, if you believe it is forced to use something like lame to convert mp3 to wav, i will do it, because i don't want (and don't have hability) to code the mp3 decoder now. but latter, it can be interresting to write something like MP3 codec in asm.
then, lets go for the reading.
|06 Jul 2011, 14:37||
You can use mpg123 ,LAME or other library to convert MP3 to WAV .
|09 Jul 2011, 15:13||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.