could not play sound file c#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mvenkatesan
    New Member
    • May 2007
    • 39

    could not play sound file c#

    Hi friends
    I am using c#2005
    I will play the sound file (.wav)
    It it could not play

    I am using below code
    public class PlayVoiceFile
    {
    [DllImport("WinM M.dll")]
    public static extern bool PlaySound(strin g fname, int Mod, int flag);
    }
    PlayVoiceFile.P laySound("filen ame.wav", 0, SND_ASYNC);

    but that file play manually (win media player)

    Thanks in advance
    Venky
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Still unsure what you want. If you W3K why not use WMS?

    Comment

    • mvenkatesan
      New Member
      • May 2007
      • 39

      #3
      Hi
      what W3K / WMS
      i am newbie
      i am use WIN xp

      Venky
      Last edited by mvenkatesan; Oct 16 '07, 12:33 PM. Reason: correct

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Are you sure it's getting the correct path for the filename?

        Comment

        • mvenkatesan
          New Member
          • May 2007
          • 39

          #5
          Yes
          its absol correct path
          Venky

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            so "filename.w av" is not the actual file you used, hehe

            Comment

            Working...