PDA

View Full Version : Playing wav... need some help..


MEPHiST0
November 13th, 2007, 01:28
hey guys..

I want to write a little tool convert wav/mp3 to .AT3 files in ASM (for MASM), AT3 is some sony codec, in this case, for PSP. i want to have custom sounds on some homebrew stuff i am workin on... so far there is no reliable tool to convert sounds to .at3, only at3 to wav.. not reversed...

i need to learn how to play .wav files in mASM... ive looked all over the net, i cant find any info on ASM wav file playing.. only c++ and java and .net..
once i learn how to play wav files, i should be able to figure out how to impliment the at3 codec and go from there..

can anyone point me to a tutorial, or some usefull info on where to start with a wav player?

CluelessNoob
November 13th, 2007, 09:05
You don't really need to play WAV files, do you?

You need to read and understand the WAV file format (Google works well) and then figure out how to generate the AT3 format data from the WAV data.

Writing the AT3 encoder will probably be the most difficult since WAV files aren't really "encoded" per se. If there is no spec for AT3 then reversing the AT3 -> WAV converter might be the easiest way to figure out the AT3 format.

Finally, why asm? Seems like it would be much easier in a higher level language like C since you're going to be manipulating (fairly) large chunks of data and doing complex encoding.

janus68
November 13th, 2007, 10:31
Or visit here : http://www.free-codecs.com/Sony_ATRAC3_Audio_Codec_download.htm

MEPHiST0
November 13th, 2007, 21:46
well im kinda n00b when it comes to coding..
i never took any classes or anything.. i just learned from examples.. and from other peoples help.. ended coding unpackers, for acouple pc protections..

but i never studied anything for pc's in school..
when i see the description, those pics of wav format i really dont understand it too much :/

i need to see some code on how to read and play .wav, then ill definatly understand it for the most part...
ive seen tons of examples for java, c+, .net ect , but i cant find anything good for asm.

but once i see how its used in asm, i could definatly figure the rest out.. but i dont know where to start with playing them.. JTLYK... i know how to code so it opens the file.. just not play it.. i have my gui already set up eheh :/

and i use ASM because its all i know how to code in.. it worked very well for acouple unpackers...

and yea i already have the atrac3 codec, but thanks janus

Kayaker
November 13th, 2007, 22:23
Suggestion, why don't you search for "play wav file" or similar in the Win32Asm or Masm forums? I know there's at least one thread there that anwers
"want a MASM sample playing (any) .WAV files using waveXXX functions"

MEPHiST0
November 13th, 2007, 22:40
ehh.. thats a good idea, didnt really think of doin that.. lol :/

i really did look alot for playing asm in wav tho..

but thanks for the tip, i will try those forums.

naides
November 14th, 2007, 06:33
Quote:
[Originally Posted by MEPHiST0;70210]

can anyone point me to a tutorial, or some usefull info on where to start with a wav player?


Regardless of the language used, if you are programming in a windows system, playing a wav involves making a structure tWAVEFORMATEX with the right parameters and invoking windows multimedia API's

http://www.codeproject.com/audio/wavefiles.asp

Doing this in C++ or in Asm has only small, superficial differences in style and very little differences in the actual code of the program. I mean, the APIs found at WINMM.DLL have the actual code doing the work, reading the wav file or stream and sending it to the sound hardware. It is already out of your control at that point, you just give the general marching instructions, be it in ASM or C, it makes little difference.

I still cannot figure out what is that you want, Mephisto: play a wav, learn the inner structure and working of a WAV file, make a codec?