Archived

This topic is now archived and is closed to further replies.

byork

gaugesound.dll

Recommended Posts

After not much success with direct sound, altered to gaugesound which will do the job I wanted and a dam site easier to understand. I have done my PA panel no problems as all sounds are called via the mouse click, but my FA Panel is a bit more difficult, when you call the FA the panel takes a couple of seconds to apear on the screen, when the panel appears on the screen it then plays a sound. I have a timer code for the panel to take a couple of seconds to apear on the screen but can not get the sound to play when the panel appears.I have tried adding code to the panel it self, as well as the toggle to open the window, but either the sound plays straight away, or it knocks out the timer code and the panel appears straight away.The CodeIn the togglemouse clickBOOL FSAPI fa_toggle_mcb( PPIXPOINT relative_point, FLAGS32 mouse_flags ){ if (fa_panel_hidden = 0) fa_panel_hidden = 1; if (fa_panel_hidden = 1) lookup_var(&seconds); //Get current time elapsed_seconds = seconds.var_value.n; time_seconds = elapsed_seconds + 2; send_key_event (KEY_PANEL_ID_OPEN,2); return FALSE;}PANEL_SERVICE_PRE_UPDATE: lookup_var(&seconds); //Get current time elapsed_seconds = seconds.var_value.n; if (elapsed_seconds <= time_seconds) { fa_panel_hidden = 1; } else { fa_panel_hidden = 0; }then in the panel PANEL_SERVICE_PRE_UPDATE: if (fa_panel_hidden == 1) { HIDE_LISTELEMENT(pgauge->elements_list[0],1); } else { SHOW_LISTELEMENT(pgauge->elements_list[0],1); } if (fa_panel_hidden = 0) { (GaugePlaySound)("sound757how.wav","",0) ; }which hides the panel untill fa_panel_hidden is reset back to 0 by the toggle code, which it does but does not play the sound.I have tried adding if (fa_panel_hidden == 0 ) { (GaugePlaySound)("sound757how.wav","",0) ; } in the panel service pre update in the toggle as well, no sound plays. Tried it in the callback for the MAKE_ICON which does play the sound but distorted. Running out of idea'sAs always any help will be greatly appreaciateEDIT:Just realised why it sounds distorted as it is firing the sound all the time. Need to work out how to only get it to fire once now.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

There is a syntax error in some of the if ( ) routines. You must use two "==" in there... ;) if (fa_panel_hidden == 0) fa_panel_hidden = 1;if (fa_panel_hidden == 1)lookup_var(&seconds); //Get current timeelapsed_seconds = seconds.var_value.n;There are a few other such errors in the code.As a general rule, only fire a sound event in a mouse callback, so it will always be a single-shot...If you simply must fire the sound event anywhere else, you'll have to define and manage a check-flag yourself to ensure it only fires once, and not at an ~18Hz rate... ;)

Share this post


Link to post
Share on other sites

Hi Billsorted the errors out :)Changed from elapsed seconds to tick18, and now working as I want it too :)toggleBOOL FSAPI fa_toggle_mcb( PPIXPOINT relative_point, FLAGS32 mouse_flags ){ if (fa_panel_hidden == 0) fa_panel_hidden = 1; else if (fa_panel_hidden == 2) fa_panel_hidden =1; if (fa_panel_hidden == 1) lookup_var(&ticks); //Get current time elapsed_seconds = ticks.var_value.n; time_seconds = elapsed_seconds + 10; sound_stop = elapsed_seconds + 12; send_key_event (KEY_PANEL_ID_OPEN,2); return FALSE;}PANEL_SERVICE_PRE_UPDATE: lookup_var(&ticks); //Get current time elapsed_seconds = ticks.var_value.n; if (elapsed_seconds <= time_seconds) { fa_panel_hidden = 1; } else { fa_panel_hidden = 0; } if (elapsed_seconds >= sound_stop && fa_panel_hidden == 0) { fa_panel_hidden = 2; }panelif (fa_panel_hidden == 0) { (GaugePlaySound)("sound757how.wav","",0); }Is there an SDK for gaugesound ?

Share this post


Link to post
Share on other sites

I am using the gaugesound.dll that the FS2Crew's I brought uses, and the code is what I have picked up from this forum. There are four or five sites I found via a google search which allow you to download a differnet version of this .dll for free but as I use a couple of the FS2Crew product I did not want to alter it as it is needed to run these correctly. I will only be using this for my personal use, so there is no harm in me using the fs2crew gaugesound.dll. If I was going to try and sell any of my gauges which uses gaugesound.dll then I suspect I would have to buy easygauge and there special license. Which also leads to another question the website is still up http://www.easygauge.net but while looking at lot of forums for sample code there were people saying that you can no longer get easygauge, can you still buy easygauge ?

Share this post


Link to post
Share on other sites

I don't know if they continue to sell it or not.GaugeSound.dll is a part of Easygauge and thus protected by it's copyrights. You can't even utilize it for any gauges written and distributed, freeware or payware, without having the appropriate Easygauge license.As far as an actual SDK... no, it doesn't exist.

Share this post


Link to post
Share on other sites

>I don't know if they continue to sell it or not.>>GaugeSound.dll is a part of Easygauge and thus protected by>it's copyrights. You can't even utilize it for any gauges>written and distributed, freeware or payware, without having>the appropriate Easygauge license.>>As far as an actual SDK... no, it doesn't exist.Is it really? Considering that there's no "Version" info with Copyright Notice, nor is there a single byte alluding to such anywhere within the actual .dll at all, it would appear to be rather difficult to prove any assertion of "rights."The only mention of "GaugeSound.dll" appears on page 3 of the manual, and even then makes no definitive assertion of rights..."You are allowed to use the GaugeSound.dll with the same licence (sic) you have for the gauges you create."I've been trying to contact Marcell Burr for over a year now (2 emails/week) to (a) obtain a new registration code so I can install EG on my new development machine, and (:( get a definitive answer to the GaugeSound.dll mystery.At this juncture I've received no reply, and quite frankly trying to enforce a copyright now would be like trying to put sunlight back in the sun... :)

Share this post


Link to post
Share on other sites

You just stated the assertion of rights:"You are allowed to use the GaugeSound.dll with the same license (sic) you have for the gauges you create."This means you can distribute GaugeSound.dll in accordance to your actual EasyGauge license regarding gauges. If you have no EasyGauge license, you have no license to use GaugeSound.dll.As for copyright enforcement... I suspect if there were enough value in pursuing a complaint, that the Burr's would magically reappear to collect what is rightfully theirs. Is it really worth the risk?And while you're pondering it... how would you feel if someone felt they could use/distribute your code as they see fit without a license?

Share this post


Link to post
Share on other sites

Quite honestly Ed, I should think that this a can of worms no one wants to open......think long and hard about it. ;)

Share this post


Link to post
Share on other sites

Would you care to expand on yyour rather cryptic comment?

Share this post


Link to post
Share on other sites

>Would you care to expand on yyour rather cryptic comment?Ed, Lonny and I have all purchased Easy Gauge, so we have therefore the legal right to distribute GaugeSound.dll with our creations...Does that "legal right" evaporate though if individual gauges are then rolled into a multi-gauge cluster?How about the hundreds of non-EG owners who've been using GaugeSound.dll over the past five years or so?No, I think that's a can best left with the lid welded in place.

Share this post


Link to post
Share on other sites

"How about the hundreds of non-EG owners who've been using GaugeSound.dll over the past five years or so?"Surely, unless they have a licence they shouldn't using it?

Share this post


Link to post
Share on other sites

If you could purchase easygauge then maybe more people would be using it with a licence. I have sent a three emails trying to buy easygauge, so I can use and release gauges which include gaugesound, but like Bill I get no reply. As the .dll is freely available via the web or even the avsim library, it seems that the Burr's are not that bothered what is happening to there creation. I have to agree with Bill on this one, this is a can of worms, which is indeed, best left with the lid welded shut.

Share this post


Link to post
Share on other sites

EasyGauge is totally dead, which is too bad because it was a great tool, although it (and the MinGW compiler) have some pretty significant limitations.With the programmer's version of EG (which is what you'd want) you can setup your mouse click areas visually, and then export everything to Visual Studio where you won't be bound so much by the limitations of EG.If you want info on the copyright and legal trademarks of the GaugeSound.dll, you can always right click on the gaugesound.dll and view the info there.Even if the Burr's have dropped off the scene, people should still respect the terms of the license.If the Burr's intended to make a version of the GaugeSound.dll with no license restrictions that could be freely distributed in any package (freeware or commercial), I'm sure they would have released such a version.Also, as mentioned a few posts up, if the Burr's discover someone is violating their license, I have a feeling they'd suddenly become very visible again, and be on your case like ugly on a moose.Cheers,Bryan

Share this post


Link to post
Share on other sites

>If you want info on the copyright and legal trademarks of the>GaugeSound.dll, you can always right click on the>gaugesound.dll and view the info there.Bryan, what part of this sentence was unclear:"Considering that there's no "Version" info with Copyright Notice, nor is there a single byte alluding to such anywhere within the actual .dll at all, it would appear to be rather difficult to prove any assertion of "rights."There simply IS NOTHING at all in either the Properties header, nor is there a single byte in the code itself to indicate ownership.http://img110.imageshack.us/img110/4876/gaugesoundbg1.jpg

Share this post


Link to post
Share on other sites