Tag: sampling

Visual Studio Profiler显示DLL名称而不是函数名称

我正在关注分析教程: http : //msdn.microsoft.com/en-us/magazine/cc337887.aspx 我试图通过使用CPU采样来分析项目。 MSDN结果: 我的结果: 我期待看到System.Drawing.Bitmap.SetPixel而不是[System.Drawing.ni.dll] 。 根据这篇文章的建议,我有: 单击“显示所有代码”链接 禁用“只是我的代码” 在工具>选项>调试>符号中选中“Microsoft Symbol Serves”,重新启动visual studio并再次运行报告。 输出(按照上述步骤后): Failed to load symbols for C:\Windows\assembly\NativeImages_v2.0.50727_64\System.Drawing\8b88ae6d063a9d8ffc2f312af5d40ce5\System.Drawing.ni.dll Loaded symbols from report for C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll Loaded symbols from report for C:\Windows\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.9200.16518_none_726fbfe0cc22f012\GdiPlus.dll Loaded symbols from report for C:\Windows\System32\ntdll.dll Loaded symbols from report for C:\Windows\System32\KernelBase.dll Loaded symbols from report for C:\Windows\System32\msvcrt.dll Failed to […]

如何在c#中获取声音数据样本值

我需要获取WAV文件的声音数据的样本值,以便通过使用那些样本值,我需要每秒获得该声音数据的幅度值。 重要提示:有没有办法使用Naudio库或wmp库获取音频数据样本值? 我以这种方式获取样本值: byte[] data = File.ReadAllBytes(File_textBox.Text); var samples=new int[data.Length]; int x = 0; for (int i = 44; i <data.Length; i += 2) { samples[x] = BitConverter.ToInt16(data, i); x++; } 但我得到的负值更像(-326260)。 这是对还是错? 我的意思是样本值是否为负值,如果它是正确的那么它是什么意思是声音还是沉默?