User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 425,988 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,660 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 10786 | Replies: 80
Reply
Join Date: Apr 2006
Posts: 52
Reputation: cindy_16051988 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
cindy_16051988 cindy_16051988 is offline Offline
Junior Poster in Training

Compression/Decompression Wave File to MP3 and Vice Versa

  #1  
Apr 20th, 2006
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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2005
Location: Tokyo, Japan
Posts: 1,481
Reputation: WolfPack has a spectacular aura about WolfPack has a spectacular aura about WolfPack has a spectacular aura about 
Rep Power: 8
Solved Threads: 102
Moderator
WolfPack's Avatar
WolfPack WolfPack is offline Offline
Mentally Challenged Mod.

Re: Compression/Decompression Wave File to MP3 and Vice Versa

  #2  
Apr 20th, 2006
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?
バルサミコ酢やっぱいらへんで
Reply With Quote  
Join Date: Apr 2006
Posts: 52
Reputation: cindy_16051988 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
cindy_16051988 cindy_16051988 is offline Offline
Junior Poster in Training

Re: Compression/Decompression Wave File to MP3 and Vice Versa

  #3  
Apr 20th, 2006
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
Reply With Quote  
Join Date: Jun 2005
Location: Tokyo, Japan
Posts: 1,481
Reputation: WolfPack has a spectacular aura about WolfPack has a spectacular aura about WolfPack has a spectacular aura about 
Rep Power: 8
Solved Threads: 102
Moderator
WolfPack's Avatar
WolfPack WolfPack is offline Offline
Mentally Challenged Mod.

Re: Compression/Decompression Wave File to MP3 and Vice Versa

  #4  
Apr 20th, 2006
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
Myputs DLL
. 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.
バルサミコ酢やっぱいらへんで
Reply With Quote  
Join Date: Apr 2006
Posts: 52
Reputation: cindy_16051988 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
cindy_16051988 cindy_16051988 is offline Offline
Junior Poster in Training

Re: Compression/Decompression Wave File to MP3 and Vice Versa

  #5  
Apr 23rd, 2006
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 the function in the
Myputs DLL
. 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.


Hi, WolfPack, thank you very much for your reply, appreciate.

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
Reply With Quote  
Join Date: Apr 2006
Posts: 52
Reputation: cindy_16051988 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
cindy_16051988 cindy_16051988 is offline Offline
Junior Poster in Training

Re: Compression/Decompression Wave File to MP3 and Vice Versa

  #6  
Apr 25th, 2006
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.
Reply With Quote  
Join Date: Jun 2005
Location: Tokyo, Japan
Posts: 1,481
Reputation: WolfPack has a spectacular aura about WolfPack has a spectacular aura about WolfPack has a spectacular aura about 
Rep Power: 8
Solved Threads: 102
Moderator
WolfPack's Avatar
WolfPack WolfPack is offline Offline
Mentally Challenged Mod.

Re: Compression/Decompression Wave File to MP3 and Vice Versa

  #7  
Apr 25th, 2006
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.
This depends on the DLL or exe that you are using. So I can't say anything specific. But it is possible to call any DLL or EXE from another program. You could post the documentation in this thread, so that we can take a look and give any specific advice if possible.
バルサミコ酢やっぱいらへんで
Reply With Quote  
Join Date: Apr 2006
Posts: 52
Reputation: cindy_16051988 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
cindy_16051988 cindy_16051988 is offline Offline
Junior Poster in Training

Re: Compression/Decompression Wave File to MP3 and Vice Versa

  #8  
Apr 25th, 2006
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?
Reply With Quote  
Join Date: Apr 2006
Posts: 52
Reputation: cindy_16051988 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
cindy_16051988 cindy_16051988 is offline Offline
Junior Poster in Training

Re: Compression/Decompression Wave File to MP3 and Vice Versa

  #9  
Apr 25th, 2006
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
Reply With Quote  
Join Date: Jun 2005
Location: Tokyo, Japan
Posts: 1,481
Reputation: WolfPack has a spectacular aura about WolfPack has a spectacular aura about WolfPack has a spectacular aura about 
Rep Power: 8
Solved Threads: 102
Moderator
WolfPack's Avatar
WolfPack WolfPack is offline Offline
Mentally Challenged Mod.

Re: Compression/Decompression Wave File to MP3 and Vice Versa

  #10  
Apr 25th, 2006
Okay since you are using lame, I will tell you how to use it.
The syntax for using lame.exe is
lame [options] inputfile [outputfile]
So say for example you want to convert the exampleinput.wav to exampleoutput.mp3.

What you have to do is this.
add the line
system( "lame.exe exampleinput.wav exampleoutput.mp3" );
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.
int main()
{
       system( "lame.exe exampleinput.wav exampleoutput.mp3" );
return 0;
}
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.
Attached Files
File Type: txt usage.txt (30.2 KB, 9 views)
バルサミコ酢やっぱいらへんで
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the C++ Forum

All times are GMT -4. The time now is 11:56 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC