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

New Post: AcmNotPossible calling acmStreamOpen

$
0
0

Here is a more detailed description:

OS: Windows 7 Professional 64-bit

NAudio: 1.6.0

Current Code:

                WaveFileReader reader = new NAudio.Wave.WaveFileReader("a.wav");
                WaveStream downsampledStream = new WaveFormatConversionStream(new WaveFormat(8000, reader.WaveFormat.BitsPerSample, reader.WaveFormat.Channels), reader);
                WaveStream alawStream = new WaveFormatConversionStream(WaveFormat.CreateALawFormat(downsampledStream.WaveFormat.SampleRate, downsampledStream.WaveFormat.Channels), downsampledStream);

 

Fails with exception at the last line (alawStream).

After the last test failed I changed the input file.

VLC says: PCM U8 (araw), Mono, 22050 Hz, Bits per Sample: 8

 

When I debug step by step the three object reader, downsampledStream and alawStream contain the following information:

reader: WaveFormat    {8 bit PCM: 22kHz 1 channels}    NAudio.Wave.WaveFormat {NAudio.Wave.WaveFormatExtraData}

downsampledStream:  WaveFormat    {8 bit PCM: 8kHz 1 channels} , TotalTime    {00:00:07.9250000}, CurrentTime    {00:00:00}

alawStream: Exception NAudio.MmResult.AcmNotPossible {"AcmNotPossible calling acmStreamOpen"}

   bei NAudio.MmException.Try(MmResult result, String function)
   bei NAudio.Wave.Compression.AcmStream..ctor(WaveFormat sourceFormat, WaveFormat destFormat)
   bei NAudio.Wave.WaveFormatConversionStream..ctor(WaveFormat targetFormat, WaveStream sourceStream)
   bei RTPtest.Form1.Form1_Load(Object sender, EventArgs e) in C:\Users\joka\documents\visual studio 2010\Projects\RTPtest\RTPtest\Form1.cs:Zeile 50.


Viewing all articles
Browse latest Browse all 5831

Trending Articles



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