[英]C# winform, App Crashing after using the Video/Audio classes from the Microsoft.DirectX.AudioVideoPlayback dll
I'm working with some Audio files in my app (mp3, wav, ..etc) I was using the Audio Class from the Microsoft.DirectX.AudioVideoPlayback dll so first I had to download the dll, after doing so, I went to Add Reference then I browsed to the dll location, and added it I also installed the DirectX 9.0 Web Setup 我正在使用我的应用程序中的某些音频文件(mp3,wav,.. etc),我使用的是Microsoft.DirectX.AudioVideoPlayback dll中的音频类,因此首先我必须下载该dll,这样做之后,我去了添加引用,然后浏览到dll位置,并添加了它,我还安装了DirectX 9.0 Web安装程序
Now, i don't get any problem with just saying: Audio aud;
现在,我只说
Audio aud;
就没问题Audio aud;
but if I do something like this: 但是如果我做这样的事情:
Audio aud = new Audio(path);
or 要么
Video vid = new Video(path);
if I press Ctrl+F5
the app will crash immediately, If i try to debug, I just can't see the debugging cursor, and if i keep pressing F10 nothing ever happens .. I put it in a try/catch
block, it didn't threw an exception .. 如果按
Ctrl+F5
则应用程序将立即崩溃;如果尝试调试,则看不到调试光标;如果继续按F10键,则什么也没发生..我将其放在try/catch
块中,它将没有抛出异常..
so what's goin on ? 那到底是怎么回事? how can i fix this ?
我怎样才能解决这个问题 ?
I even tried to make a whole new app, here's the whole code, there's nothing really in it: 我什至尝试制作一个全新的应用程序,这是完整的代码,其中实际上没有任何内容:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.DirectX.DirectSound;
using Microsoft.DirectX.AudioVideoPlayback;
using Microsoft.DirectX;
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Audio aud = new Audio("C:\\Users\\vexe\\Desktop\\Songs\\Kimosabe.mp3");
}
}
}
Any help would be appreciated .. Thanks in advance .. 任何帮助将不胜感激..在此先感谢..
add this code to your project: 将此代码添加到您的项目中:
using Microsoft.DirectX.DirectSound
using Microsoft.DirectX
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.