Mp3 Player

FPGA projects on this site, or abroad

Mp3 Player

Postby tripper » Wed Nov 25, 2009 6:57 pm

I tried compiling the code linked to the mp3 project in Visual C++ Ver 6. and receive the c2011 error. It looks like the problem is in this block, I think
//typedef struct mpeglayer3waveformat_tag
//{
// WAVEFORMATEX wfx2;
//WORD wID2;
//DWORD fdwFlags2;
//WORD nBlockSize2;
//WORD nFramesPerBlock2;
//WORD nCodecDelay2;
//} MPEGLAYER3WAVEFORMAT2;
I also compiled it after commenting out these lines and the code succesfully compiled, but how do I pass the mp3.file as an argument? I tried just running the .exe but the dialog open and closes quickly. Any tips would be appreciated.
tripper
 
Posts: 3
Joined: Mon Nov 23, 2009 12:06 pm

How to link an mp3 file

Postby tripper » Wed Nov 25, 2009 8:25 pm

I think I solved the problem in VC++ by renaming typedef struct mpeglayer3waveformat_tag to typedef struct mpeglayer3waveformat_tag1. I also renamed:
WORD nFramesPerBlock;
WORD nCodecDelay;
} MPEGLAYER3WAVEFORMAT;

to
WORD nFramesPerBlock;
WORD nCodecDelay;
} MPEGLAYER3WAVEFORMAT1;

My next question is how do I pass an mp3 file to this program? When it executes a box appears stating argument required(mp3 file). Are there instructions for this program?
tripper
 
Posts: 3
Joined: Mon Nov 23, 2009 12:06 pm

pass mp3 file

Postby tripper » Fri Nov 27, 2009 3:44 pm

I included the following line to the mp3 project example:

#define SOURCE_MP3 "song.mp3"

however that returns several compiling errors:

C:\Documents and Settings\student\Desktop\acm_mp3.cpp(79) : error C2143: syntax error : missing ')' before 'string'
C:\Documents and Settings\student\Desktop\acm_mp3.cpp(79) : error C2143: syntax error : missing ';' before 'string'
C:\Documents and Settings\student\Desktop\acm_mp3.cpp(79) : fatal error C1004: unexpected end of file found

Any suggestions?
tripper
 
Posts: 3
Joined: Mon Nov 23, 2009 12:06 pm


Return to General projects