April 20, 2024, 02:49:57 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Why won't my wav file play under Windows Vista without a long delay

Started by AdrianFox, December 10, 2009, 01:31:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AdrianFox

I've created a small Xmas program which plays a merry tune (amongst a number of other things)... Jingle Bells in French if I dare admit it!  (It's so BAD it's good!)

The program works perfectly on my XP laptop with the " playwave "jingle.wav",@SNDASYNC command ".  The music starts instantly.

But  on to my Vista Desktop, the music takes ages to load before playing, even though it's a much faster machine.  I've tried changing the default players to Windows Media Player, Winamp, RealPlayer etc but this makes little difference.

What's the difference between the two machines?  How do I get the instant response on the Vista machine?

A second  problem is that text in buttons is not properly displayed under the different screen resolutions (part of the text is obscured).  How do I set about avoiding this?
LATER COMMMENT... First, sorry that really this should have been posted in the 'off topic' forum... as it's really a Vista problem, nothing to do with Emergence.
Just to say I've solved my problem by playing with Vista settings most of the day... removed most of the visual enhancements, got rid of 'user account control' slows every program down, added more virtual disk space (though I've already got 6 gigs of memory.. found a couple of malware files, and did a defrag... anyway, things now zipping along almost as fast as on XP.... but I will definitely be following Codex's example and investing in Windows 7.   
Adrian Fox

Copex


it could be your virus checker causng the delay or morelikly vista's UAC doing something random, try loage the wav as a resource then playing it... i would try it but i diched vist for win seven, wow it was one of the best moves i have made :-)
-
I really should learn how to use a spell checker! though im not sure how it will help someone who can not spell?
-
Except where otherwise noted, content Posted By Copex is
licensed under a Creative Commons Attribution 3.0 License

http://creativecommons.org/licenses/by/3.0/

AdrianFox

Thanks for the suggestion Copex.  I've noticed now that all my media files start only after huge delays on my Vista machine and that the Internet help forums are full of those complaining about similar problems.  I haven't found a solution for this yet, as disabling 'enhancements' in control panel has no effect on my machine.
Looking at including the wav file as a resource on these forums, this looks fairly complex... why would this be likely to work differently... wouldn't the sound card and player software react in the same way even if it was a resource?

Anyway, I've distributed my Xmas card software to a couple of friends who run Vista so I should find out from them if their machines react in the same way.

Like you say, it's probably time to move on anyway to Windows 7!   Although I read somewhere about users already complaining about black screen/blue screen problems with that!
Adrian Fox

Copex

ok, there is no delay on windows seven, the only problem i get with windows seven it the delay when compiling i get a not responding message on ebasic's ide :-) (maybe a VC problem)

i have attached a rar zip file with two examples, one loads the wav and plays it, the other is a project that compiles the wav as a resource, sorry there are no comments but you should beable to look at the code and make sense of it :-) (if not just ask)

project the basics are...

open project , add resource - id = res_snd - type = custom - custom type = wave

open source code, insert in to project, ( not forgetting the $MAIN as i did then wondering why it would not compile)

i have in cluded the .exe for both and code so you can compile it or just run the exe's it will be intresting to see if it make any differnce.

-love/hate - vista

vista ran fine on my system untill the windows seven beta appeared then every windows update somthing strange started to happen,

i use to get the black screen problem on vista, though it's been fixed by a update....

i have upgraded all my p.c to win7 MS should give win7 free to anyone who owned vista as payment for testing such a crappy OS, seriously you dont realise how bad it is until you stop using it...
i have win7 running on a P4 a netbook (runs better than xp) , dulecore, and a quadcore. ive dunn upgrade as well as new installs with out any problemas (so far) i have also installed it for friends and fammily with out complaints.

   




-
I really should learn how to use a spell checker! though im not sure how it will help someone who can not spell?
-
Except where otherwise noted, content Posted By Copex is
licensed under a Creative Commons Attribution 3.0 License

http://creativecommons.org/licenses/by/3.0/

AdrianFox

Have now completed the program.  Great!  Thanks so much for the help Copex, as I'm delighted I now know how to include a music file as a resource!  The main problem was simply knowing to define the ID as res_snd and how to load into memory.

You are quite right this enables music to play instantly with no delays.


Thanks  for the sample code and exe for compiling wav files as a resource.
I'd been studying some examples on this from the forums and in the EB manual, but hadn't been making much progress.  Your code was very easy to follow and it became clear how to enter this and load as a resource.


You have convinced me also that Windows 7 is the way to go and I am convincing my wife that it would make a good Xmas present!

Thanks again for all your help, it is really appreciated.   :) :)
Adrian Fox

Copex

no problem, the ID can be anything its used to load the resource, its the custom (resource) type that is important that has to be wave.

glad to be helpfull.
-
I really should learn how to use a spell checker! though im not sure how it will help someone who can not spell?
-
Except where otherwise noted, content Posted By Copex is
licensed under a Creative Commons Attribution 3.0 License

http://creativecommons.org/licenses/by/3.0/