| | |
Compression/Decompression Wave File to MP3 and Vice Versa
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2006
Posts: 52
Reputation:
Solved Threads: 0
Hello, everybody. Sorry to disturb you all.
Currently, I have a speech recording and playback software developed by Microsoft Visual C++ 6.0. The software is used to train children with speech problem and scores will be calculated and showed at the end of each practice session. The software is able to record and playback real-time.
Children use this software at home and save their practice records in a single floppy disk. Then, children will bring the floppy disk with practice records inside when they return to our centre. There are 20 wave files that must be saved in a single floppy disk. Due to space insifficiency, one floppy disk is 1.44M in capacity.
Total size of 20 wave files = 20*188k = 3,760,000 bytes
Total floppy disk needed = (3,760,000)/1,440,000 = 2.6 floppy disks
But, I must save all the 20 wave files into a single floppy disk
Our problem is we are not able to save all 20 wave files in a single floppy disk. We cant afford a CD-RW for each child and we must use floppy disk. The solution is we have to compress the wave file to save the files in a floppy and decompress the files back to wave file in order to listen to how the children practice at home.
I am totally new to this as the software is written by one of my previous friend who worked together with me in a voluntary speech rehabilitation centre. We need this software to train children in the centre. I work part time there.
But, my problem is how to call any CODEC dll into correct place into my current project platform without causing any bugs? Please forgive me if I have asked a very silly question, I am sorry. After I have added the cpp and h files into my current project paltform, I dont know what should I do next.
My final destination is to save all 20 wave files in a single floppy disk. I didnt restrict that I must use compression/decompression methods but I dont know what else should I use.
Hope you can give me some guidances on how to do it or you please link me to pages that help me to do so. I promise I can learn as independent as possible but I really need your guidance at this very beginning, please.
Please, I really appreciate all your help.
Currently, I have a speech recording and playback software developed by Microsoft Visual C++ 6.0. The software is used to train children with speech problem and scores will be calculated and showed at the end of each practice session. The software is able to record and playback real-time.
Children use this software at home and save their practice records in a single floppy disk. Then, children will bring the floppy disk with practice records inside when they return to our centre. There are 20 wave files that must be saved in a single floppy disk. Due to space insifficiency, one floppy disk is 1.44M in capacity.
Total size of 20 wave files = 20*188k = 3,760,000 bytes
Total floppy disk needed = (3,760,000)/1,440,000 = 2.6 floppy disks
But, I must save all the 20 wave files into a single floppy disk
Our problem is we are not able to save all 20 wave files in a single floppy disk. We cant afford a CD-RW for each child and we must use floppy disk. The solution is we have to compress the wave file to save the files in a floppy and decompress the files back to wave file in order to listen to how the children practice at home.
I am totally new to this as the software is written by one of my previous friend who worked together with me in a voluntary speech rehabilitation centre. We need this software to train children in the centre. I work part time there.
But, my problem is how to call any CODEC dll into correct place into my current project platform without causing any bugs? Please forgive me if I have asked a very silly question, I am sorry. After I have added the cpp and h files into my current project paltform, I dont know what should I do next.
My final destination is to save all 20 wave files in a single floppy disk. I didnt restrict that I must use compression/decompression methods but I dont know what else should I use.
Hope you can give me some guidances on how to do it or you please link me to pages that help me to do so. I promise I can learn as independent as possible but I really need your guidance at this very beginning, please.
Please, I really appreciate all your help.
•
•
Join Date: Apr 2006
Posts: 52
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by WolfPack
So do you want a DLL that converts MP3 to and from Wav format?
Or Do you want to know how to call a DLL that you already have?
Hi, WolfPack, thank you very much for your reply, really appreciate much.
I didnt write a dll on our own but I managed to find some CODEC source codes from the websites but my problem is I dont know how to call a DLL from my software project platform.
Could you please guide me some or link me to the page that got the DLL together with its tutorial or details on how to call the DLL from my software?
Please help, I really need some guidance at this very beginning, I promise I will learn as independent as possible. But I just need helps in this very beginning, please, appreciate
Okay then I assume you have the DLL with you. So you should have the documentation of that DLL also. That is you must know the functions available, what the functions do, and what are the parameters the functions need to execute properly. After looking up for those in the documentation you can refer this site, which is an example on How to call the function in the . I think it is fairly straightforward, but you can ask if you run into further problems.
I must also say that I appreciate what you are doing to help those kids with speech problems.
C++ Syntax (Toggle Plain Text)
myPuts
C++ Syntax (Toggle Plain Text)
Myputs DLL
I must also say that I appreciate what you are doing to help those kids with speech problems.
バルサミコ酢やっぱいらへんで
•
•
Join Date: Apr 2006
Posts: 52
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by WolfPack
Okay then I assume you have the DLL with you. So you should have the documentation of that DLL also. That is you must know the functions available, what the functions do, and what are the parameters the functions need to execute properly. After looking up for those in the documentation you can refer this site, which is an example on How to call thefunction in theC++ Syntax (Toggle Plain Text)
myPuts. I think it is fairly straightforward, but you can ask if you run into further problems.C++ Syntax (Toggle Plain Text)
Myputs DLL
I must also say that I appreciate what you are doing to help those kids with speech problems.
I am still 'digesting' what you said here and I will read about the documentation if I could find one and I hope I can understand.
I try my best and will tell you how I am doing
•
•
Join Date: Apr 2006
Posts: 52
Reputation:
Solved Threads: 0
Hi, WolfPack, Sorry to disturb, May I ask?
I was confused with the dll. I just want to call the third-party software.exe to help me do the compression and decompression part. Do I need to call the dll? Or, Can I just call the .exe from my software?
Sorry for causing any confusion, I was not clear with dll before I put this thread, after I read the pdf about dll, I think that maybe I dont need to call dll but just call the exe.
Please forgive me, I apologized for the trouble caused by me.
Do you think it is possible to call any CODEC software exe from my software? Which one is easier for a newbie like me?
But, I dont know how can I do so, do you mind to give me some guidance? Please, Please forgive me for my ignorance. I try my best in doing it. Hope you can teach me some. Please.
I was confused with the dll. I just want to call the third-party software.exe to help me do the compression and decompression part. Do I need to call the dll? Or, Can I just call the .exe from my software?
Sorry for causing any confusion, I was not clear with dll before I put this thread, after I read the pdf about dll, I think that maybe I dont need to call dll but just call the exe.
Please forgive me, I apologized for the trouble caused by me.
Do you think it is possible to call any CODEC software exe from my software? Which one is easier for a newbie like me?
But, I dont know how can I do so, do you mind to give me some guidance? Please, Please forgive me for my ignorance. I try my best in doing it. Hope you can teach me some. Please.
•
•
•
•
Originally Posted by cindy_16051988
Hi, WolfPack, Sorry to disturb, May I ask?
I was confused with the dll. I just want to call the third-party software.exe to help me do the compression and decompression part. Do I need to call the dll? Or, Can I just call the .exe from my software?
Sorry for causing any confusion, I was not clear with dll before I put this thread, after I read the pdf about dll, I think that maybe I dont need to call dll but just call the exe.
Please forgive me, I apologized for the trouble caused by me.
Do you think it is possible to call any CODEC software exe from my software? Which one is easier for a newbie like me?
But, I dont know how can I do so, do you mind to give me some guidance? Please, Please forgive me for my ignorance. I try my best in doing it. Hope you can teach me some. Please.
バルサミコ酢やっぱいらへんで
•
•
Join Date: Apr 2006
Posts: 52
Reputation:
Solved Threads: 0
HI, WolfPack, thanks for your post.
I would like to call the lame.exe into my current software and I know where or which location to call the lame.exe from my software.
After I put the lame.exe into my project folder, what codes or command that I should write in order to call the lame.exe to come out?
I would like to call the lame.exe into my current software and I know where or which location to call the lame.exe from my software.
After I put the lame.exe into my project folder, what codes or command that I should write in order to call the lame.exe to come out?
•
•
Join Date: Apr 2006
Posts: 52
Reputation:
Solved Threads: 0
Hi, WolfPack, actually it is not necessary for me to use lame. I managed to find many source codes of CODEC from website.
My problem is I dont know how to call the third-party software from my software project.
I could send you the source codes if they help.
I really need some guidance, hope you can guide, I appreciate. Please
My problem is I dont know how to call the third-party software from my software project.
I could send you the source codes if they help.
I really need some guidance, hope you can guide, I appreciate. Please
Okay since you are using lame, I will tell you how to use it.
The syntax for using lame.exe is
So say for example you want to convert the exampleinput.wav to exampleoutput.mp3.
What you have to do is this.
add the line
into your program and compile.
put lame.exe and exampleinput.wav to the folder where you have put your program, and run your program. You should find the exampleoutput.mp3 file created inside that folder.
here is a minimal example.
Compile the above program and put the lame.exe and exampleinput.wav file to the same folder where your program is. Then run it. You should see the results.
For more information refer the usage.txt file that came with the dll file. I have attached it in this post too.
The syntax for using lame.exe is
C++ Syntax (Toggle Plain Text)
lame [options] inputfile [outputfile]
What you have to do is this.
add the line
C++ Syntax (Toggle Plain Text)
system( "lame.exe exampleinput.wav exampleoutput.mp3" );
put lame.exe and exampleinput.wav to the folder where you have put your program, and run your program. You should find the exampleoutput.mp3 file created inside that folder.
here is a minimal example.
C++ Syntax (Toggle Plain Text)
int main() { system( "lame.exe exampleinput.wav exampleoutput.mp3" ); return 0; }
For more information refer the usage.txt file that came with the dll file. I have attached it in this post too.
バルサミコ酢やっぱいらへんで
![]() |
Other Threads in the C++ Forum
- Previous Thread: arrays and functionality of the program...
- Next Thread: please fix the error
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count database delete deploy desktop developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker list loop looping loops map math memory multiple news node number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference rpg sorting string strings struct temperature template test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






