Jump to content

FIXED: problem with sndPlaySound in CVI

- - - - -

  • Please log in to reply
No replies to this topic

#1
Guest_dogbox_*

Guest_dogbox_*
  • Guests
edit: wow. i forgot to use double slashes >.>



Hi guys
I've been using CVI to try to create a piano keyboard program, but I can't seem to get sndPlaySound to work. I've created the .wav files, but the function doesn't recognize the files or something. here's part of the code including the headers

#include <windows.h>

#include <cvirte.h>

#include <userint.h>

#include "uir.h"

#include <mmsystem.h>

int CVICALLBACK ACallback (int panel, int control, int event,

void *callbackData, int eventData1, int eventData2)

{

switch (event)

{

case EVENT_COMMIT:

sndPlaySound("a.wav",0);

break;

}

return 0;

}

whenever it executes the sndPlaySound, a system beep goes off. When I tried sndPlaySound("a.wav",SND_NODEFAULT), there was no sound. Anyone have any ideas? I've been stuck on this for awhile and any help would be appreciated!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users