03-20-2006 07:33 AM
03-20-2006 08:12 AM
What OS are you using? XP is particularly good at caching such file operations, so that although it appears to be reloading from disc each time as far as your program is concerned, it is in reality only being reloaded from an internal Windows memory area.
JR
03-20-2006 08:15 AM
03-20-2006 08:24 AM
With regard to internal Windows operations, you would probably have better luck on the Microsoft Forums. Don't know of a way for CVI to embed a resource as you suggest - NI should be able to tell you.
JR
03-22-2006 04:10 AM
Hi Jamie
There is no direct way to embed resources into an exe so the only way to do it would be to define the bit stream as an array constant.
What you could do to embed the wav file is to work out the bit stream, embed the array and load it in as constant. You could do this directly in your code or crate a dll and have the bit stream data as an array constant and use a function to call the data this would allow you to change the dll at a later date without rebuilding the exe.
This isn’t the neatest way of doing it and I would still recommend reading it from a file.
Hope this help
Tim
NI
04-12-2006 12:06 PM
04-12-2006 12:26 PM
I don't know if there is an easier way; however, it was pretty easy to do using this.
Look in your CVI executable directory (I use 8.0 -- so ...CVI80\samples\sdk\audio ) for the
files playsnd.c and playsnd.h. I took them and incorporated them into my project and then made
calls to CVI_PlaySoundEx() straight from my code. I also have the WINMM.LIB as part of my project.
I don't remember whether I had to add it or whether I was prompted. either way......
That should do it.
04-21-2006 10:34 AM - edited 04-21-2006 10:34 AM
Message Edited by Pythonist on 04-21-2006 10:36 AM
05-09-2006 09:50 AM
05-09-2006 10:02 AM