locked
sndPlaySound on Vista Home Premium RRS feed

  • Question

  • Hi, I'm using visual studios 2005. My playsound can't seem to work, but rarely after I close my vs 2005 while leaving the .exe on sounds can be heard for less than 2 seconds.

    Anyone knows how I can fix this problem? Thanks!
    Saturday, March 24, 2007 10:42 AM

Answers

  • Hi, I thought it is something related to VS2005 from original description(happens when VS2005 close), but now it seems VS2005 is sinless Smile May I suggest you have a try on win32.programmer.mmedia newsgroup since I found some similar post there, probably folks there have more knowledge on this regard, good luck.

     

    PS: I also tried to use PlaySound in VS2005 + windows server 2003, ran fine.

    Wednesday, March 28, 2007 5:31 AM
  • Alright... thanks!
    Wednesday, March 28, 2007 7:49 AM

All replies

  • Hello

     

    Could you also show us the problematic code? Or, if it is big, try to make a narrowed sample code that can generate same problem.

     

    thanks

    rico

    Tuesday, March 27, 2007 2:55 AM
  • Hi...

    It worked on XP, visual studio 2003 but when I bring it to vista home with visual studios 2005 it did not play the sound... I've

    checked that winMM.lib was included in the additional dependencies...

     

    Edit-

    I ran through the exe again, sounds are played but around 20 seconds after I hit the key, it was suppose to be immediate.

    The code...

    void Keyboard(unsigned char key, int aX, int aY)

    {

    switch(key)

    {

    case '1':

    {

    PlaySound("bg.wav",NULL,SND_ASYNC | SND_LOOP) ;

    playsong = true ;

    }

    break;

    }

    RenderScene() ;

    }

    My mistake, it was PlaySound instead of sndPlaySound but is it supposed to be like that?

    Tuesday, March 27, 2007 6:32 PM
  • Hi, I thought it is something related to VS2005 from original description(happens when VS2005 close), but now it seems VS2005 is sinless Smile May I suggest you have a try on win32.programmer.mmedia newsgroup since I found some similar post there, probably folks there have more knowledge on this regard, good luck.

     

    PS: I also tried to use PlaySound in VS2005 + windows server 2003, ran fine.

    Wednesday, March 28, 2007 5:31 AM
  • Alright... thanks!
    Wednesday, March 28, 2007 7:49 AM
  • Sir,

          I have a DELL Inspiron 1420 loaded with OS as VIsta Home Premium. However I have forgotten the Adminstrator password that I had reset for my laptop  a few weeks back.
    WHAT SHOULD I DO TO OVERWRITE IT ?? OR CHANGE IT ?

    There MUST be some WAY OUT to overwrite or change it. Please give me the detailed procedures as I don't have an IT background.

        Plzz reply to this mail . I am highly distressed because of this . I need my laptop for my day-to-day work and cannot work withou it. Please I need the DELL Tech Supports help to resolve this issue.

                                  
        Thanks and regards

    -Arijit Das.
    Friday, July 25, 2008 9:26 PM