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

New Post: Ima Adpcm Error during Compression

$
0
0

 I tried in this way by creating  My_ImaAdpcmWaveFormat method Ima Adpcm class,and i am passing that Extra Byte value,since Extra Byte in Hexadecimal,i converted that to Decimal,then passed to these Function.

public My_ImaAdpcmWaveFormat(int sampleRate, int channels, int bitsPerSample,int sampleperblock)     

  {       

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

       this.sampleRate = sampleRate;       

       this.channels = (short)channels;

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

       this.extraSize = 2;//    

       this.blockAlign = 0; //TODO    //Also i tried for blockalign and avgbytespersecond also i assigned values 

        this.averageBytesPerSecond = 0; //TODO       

        this.samplesPerBlock = short(sampleperblock);                

}

Then,when i excecute following line,

convertedStream=NewWaveFormatConversionStream(NewImaAdpcmWaveFormat(InputFormat.SampleRate,InputFormat.Channels,InputFormat.bitspersample,63745), Reader)                  

Getting the same error ""AcmNotPossible Calling the AcmStreamOpen"".So " How i need to make use of those extra bytes...?"


Viewing all articles
Browse latest Browse all 5831

Trending Articles