1

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

Now, i don't get any problem with just saying: 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 ..

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 ..

vexe
  • 5,433
  • 12
  • 52
  • 81

1 Answers1

0

add this code to your project:

using Microsoft.DirectX.DirectSound
using Microsoft.DirectX
KF2
  • 9,887
  • 8
  • 44
  • 77
  • 1
    change your app.config like this: – KF2 Aug 01 '12 at 18:47
  • Could you Please tell me how exactly can I reach this file ? cuz I'm getting confused .. – vexe Aug 01 '12 at 19:09
  • i think version of directx you already installed have problem,but if you want to work with audio file the best chose is "fmod.dll" it have a lot of option for working with audio file:http://www.fmod.org/ – KF2 Aug 01 '12 at 19:09