简体   繁体   English

C#winform,使用Microsoft.DirectX.AudioVideoPlayback dll中的Video / Audio类后,应用程序崩溃

[英]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.

相关问题 c#使用Microsoft.DirectX.AudioVideoPlayback如何在完成一个视频后播放下一个视频 - c# using Microsoft.DirectX.AudioVideoPlayback how to play next video after one is finished Activemovie窗口在C#中弹出Microsoft.DirectX.AudioVideoPlayback - Activemovie window pop up Microsoft.DirectX.AudioVideoPlayback in C# 使用Microsoft.DirectX.AudioVideoPlayback播放视频时出错; 程序集版本错误 - Error playing video using Microsoft.DirectX.AudioVideoPlayback; assembly version error 通过Microsoft.DirectX.AudioVideoPlayback显示对视频播放的控制 - Display a Control over video playing via Microsoft.DirectX.AudioVideoPlayback SharpDX中的Microsoft.DirectX.AudioVideoPlayback替代 - Microsoft.DirectX.AudioVideoPlayback alternative in SharpDX Microsoft.DirectX.AudioVideoPlayback程序不起作用 - Microsoft.DirectX.AudioVideoPlayback program not working C#Microsoft.DirectX.AudioVideoPlayback.Video参考? - C# Microsoft.DirectX.AudioVideoPlayback.Video reference? 找不到参考Microsoft.DirectX.AudioVideoPlayback - Can't find reference Microsoft.DirectX.AudioVideoPlayback 找不到引用Microsoft.DirectX.AudioVideoPlayback和Microsoft.DirectX - can't find references Microsoft.DirectX.AudioVideoPlayback and Microsoft.DirectX 在 C# WinForm 中使用 DirectX 播放视频 - Play video using DirectX in C# WinForm
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM