Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: Ima Adpcm Error during Compression

$
0
0

Like this way also i tried..... 63745 is the Decimal value of Extra Byte:F901 


 TargetFormat = ImaAdpcmWaveFormat.MyImaAdpcmWaveFormat(8000, 1, 4, 63745)

convertedStream = New WaveFormatConversionStream(TargetFormat, Reader)

public static ImaAdpcmWaveFormat MyImaAdpcmWaveFormat(int sampleRate, int channels, int bitsPerSample, float sperblock)   

    {

          ImaAdpcmWaveFormat ImaAdpcmWformat = new ImaAdpcmWaveFormat();

          ImaAdpcmWformat.waveFormatTag = WaveFormatEncoding.DviAdpcm; // can also be ImaAdpcm - they are the same   

        ImaAdpcmWformat.sampleRate = sampleRate;   

        ImaAdpcmWformat.channels = (short)channels;   

        ImaAdpcmWformat.bitsPerSample = (short)bitsPerSample; // TODO: can be 3 or 4       

       ImaAdpcmWformat.extraSize = 2;//          

       ImaAdpcmWformat.blockAlign = 256; //TODO       

      ImaAdpcmWformat.averageBytesPerSecond = 4055; //TODO       

      ImaAdpcmWformat.samplesPerBlock = (short)sperblock; // TODO           

   return ImaAdpcmWformat;       

}

Same error i am getting.


Viewing all articles
Browse latest Browse all 5831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>