This project has moved and is read-only. For the latest updates, please go here.

cant read G729 file

Jul 9, 2009 at 11:02 AM

hi~ i wanna convert G729 wave file to PCM file, but it failed.
my code:
NAudio.Wave.WaveFileReader reader1 = new WaveFileReader(webpath);     // where webpath is the link of file in G729 (compression code = 0x0083)

after ran it, error of 

invalid waveformat structure received as below:

Server Error in '/Chart' Application.

Invalid WaveFormat Structure

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ApplicationException: Invalid WaveFormat Structure

Source Error:

Line 28:          *******file.***********************************************
Line 29:          ***********************************************************/
Line 30:            NAudio.Wave.WaveFileReader reader1 = new WaveFileReader(webpath);
Line 31:            NAudio.Wave.WaveStream convertedStream = WaveFormatConversionStream.CreatePcmStream(reader1);
Line 32:            WaveFileWriter.CreateWaveFile(output, convertedStream);

 
why would it happen and is there any method to slove this??
thx


Jul 10, 2009 at 12:20 AM

I don't think that format is supported. Have you tried debugging with a copy of the NAudio code to see where the actual error is generated? There is a large repository available for you to work with to pin point the error you are looking at; i.e. which line in NAudio is actually throwing the exception rather than what your implementation debug message is generating.

Cheers,
OpenSebJ