locked
The type or namespace name 'WAVFile' could not be found (are you missing a using directive or an assembly reference RRS feed

  • Question

  • WAVFile audioFile = new WAVFile();

                string warning = audioFile.Open("11.wav", WAVFile.WAVFileMode.READ);


    Thursday, August 28, 2014 9:09 AM

Answers

All replies

  • You need to either define the WAVFile class yourself or add a reference to an assembly where this class is defined.

    If you have already done this, you should add a using directive at the top of your code file that imports the namespace where the class is defined:

    using TheNameSpaceForTheClass; //replace "heNameSpaceForTheClass" with the name of the actual namespace...

    I guess you got the code from the following page: http://www.codeproject.com/Articles/35725/C-WAV-file-class-audio-mixing-and-some-light-audio. Then you should be able to download the and see exactly how the class is used.

    For more information about how to add a reference in Visual Studio, please refer to the following page: http://msdn.microsoft.com/en-us/library/wkze6zky.aspx

    • Marked as answer by Kristin Xie Friday, September 5, 2014 3:18 AM
    Thursday, August 28, 2014 9:25 AM
  • but i don't know how to  define the WAVFile class myself ?
    Thursday, August 28, 2014 10:38 AM
  • What do you want to do with the class anyway? If you have downloaded this WAVFile class from somewhere you need to copy it to your solution or reference an assembly/project where it is defined like I have already mentioned.

    There is no built-in WAVFile class in the .NET Framework so you cannot use some WAVFile class unless you, or someone else, define it.

    Thursday, August 28, 2014 10:43 AM
  • if u can i need end solution urgent now
    Thursday, August 28, 2014 11:32 AM
  • Hi mostafa,

    I am agree with Magnus. We don't know how to define you WAVFile class. And we also don't know what kind of function you want to achieve and what the logic is.

    Based upon your code, you need to reference WAVFile class to you project.

    If you have some code error info, you could post them in this forum. Thanks for your understanding. If there's anything you'd like to know,don't hesitate to post it.

    Best regards,

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Kristin Xie Friday, August 29, 2014 7:21 AM
    Friday, August 29, 2014 7:20 AM