ACM流转换的异常显示AcmNotPossible [英] ACM Stream Convert exception displaying AcmNotPossible

查看:752
本文介绍了ACM流转换的异常显示AcmNotPossible的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在从服务器解压缩的MP3的帧而MP3播放已经打了10到15 sec.My应用程序时出现上述异常是一个客户端/服务器application.I米,宽组成的MP3和数据包序列过来送mp3帧使用 n音讯开源API 对于压缩和解压缩帧并打Mp3.I得到带有堆栈跟踪下面的异常网络Stream.I米





NAudio.MmException.Try(MmResult结果,字符串函数)



在NAudio.Wave.Compression.AcmStreamHeader.Convert(的Int32 bytesToConvert,的Int32&安培; sourceBytesConverted)



在NAudio.Wave.Compression.AcmStream.Convert(的Int32 bytesToConvert,的Int32&安培; sourceBytesConverted)



在NAudio.Wave.AcmMp3FrameDecompressor.DecompressFrame(Mp3Frame框架,字节[] DEST,的Int32 destOffset)



在Client.Audio.SoundPlayer.StreamMP3(对象状态)




解决方案

AcmNotPossible是由的 acmStreamConvert 的Windows功能,调用到MP3 ACM编解码器。该错误可能表明要么是无效的MP3帧,或者你已经太多帧一次通过。你,你得到整个MP3框架如何确定的?它是由你也收到数据写入MP3文件,然后检查,可以播放如预期调试这样的问题,是个好主意。


When decompressing frames of Mp3 from Server the above mentioned exception occurs while the Mp3 have been played for 10 to 15 sec.My application is a Client/Server application.I m sending the Mp3 Frames by composing Mp3 Packets and serializing it over Network Stream.I m using NAudio Open Source API for Compressing and Decompressing Frames and Playing the Mp3.I get the following exception with Stack Trace.

NAudio.MmException.Try(MmResult result, String function)

at NAudio.Wave.Compression.AcmStreamHeader.Convert(Int32 bytesToConvert, Int32& sourceBytesConverted)

at NAudio.Wave.Compression.AcmStream.Convert(Int32 bytesToConvert, Int32& sourceBytesConverted)

at NAudio.Wave.AcmMp3FrameDecompressor.DecompressFrame(Mp3Frame frame, Byte[] dest, Int32 destOffset)

at Client.Audio.SoundPlayer.StreamMP3(Object state)

解决方案

AcmNotPossible is an error code returned by the acmStreamConvert Windows function, which calls into the MP3 ACM codec. This error likely indicates either an invalid MP3 frame, or that you have passed in too many frames at once. How sure are you that you are getting whole MP3 frames? It is a good idea to debug problems like this by also writing the data you receive to an MP3 file and then checking that can play as expected.

这篇关于ACM流转换的异常显示AcmNotPossible的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆