?
Solved

convert MP3 to Wave File?

Posted on 2003-02-19
8
Medium Priority
?
303 Views
Last Modified: 2010-04-04
Who can give me a component to convert mp3 to wav file or give me source code!

thanks.
0
Comment
Question by:DavidZhou
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
8 Comments
 

Author Comment

by:DavidZhou
ID: 8005895
Please Help
0
 
LVL 1

Accepted Solution

by:
Dissaster earned 400 total points
ID: 8045556
Check the XAudio Dll, it has a component interface for delphi, and can do what you want. Here´s the code i used, the instance for the XAudio component is named Decoder.

  lRAWFile := RawFileName(AudioFile);
  Decoder.OutputModuleRegister('xa_dsound_output.dll');
  Decoder.SetPlayerEnvironmentInteger('OUTPUT.DIRECTSOUND.WINDOW', (Owner as TWinControl).Handle);
  Decoder.SetOutputChannels(1); //for mono, 2 for stereo
  Decoder.SetPlayerMode(XA_PLAYER_MODE_OUTPUT_AUTO_CLOSE_ON_EOF);
  Decoder.SetOutputName(lRAWFile);
  Decoder.InputOpen(MP3File);
  Decoder.Play;

You'll know when it ended decoding the file in the OnDecoderNotifyOutputState event of the decoder, if the State is XA_OUTPUT_STATE_CLOSED then it´s finished.

  procedure MyForm.DecoderNotifyOutputState(Sender : TXaudioPlayer; State : integer);
  begin
    if State = XA_OUTPUT_STATE_CLOSED then
    begin
      //Do something here
    end;
  end;
0
 
LVL 1

Expert Comment

by:Dissaster
ID: 8045559
An error with the code above, the next line is not necesary, it was part of the proyect I used the decoder in:

lRAWFile := RawFileName(AudioFile);
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:DavidZhou
ID: 8051182
thanks,but where can i get the xaudio SDK, i can't find the download URL in http://www.xaudio.com/ 
0
 

Author Comment

by:DavidZhou
ID: 8085233
thanks. i have down it
0
 

Author Comment

by:DavidZhou
ID: 8085280
thanks. i have down it
0
 

Author Comment

by:DavidZhou
ID: 8085347
thanks. i have down it
0
 

Author Comment

by:DavidZhou
ID: 8085586
thank you very much
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question