Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can't making looping sound stop

Featured Replies

I am using the following code. The looping sound turns on just fine. But it won't shut off when the variable Alarm_pos is set to 0.switch(service_id){case PANEL_SERVICE_PRE_UPDATE:MGaugeSound = GetModuleHandle("GaugeSound");if (MGaugeSound == NULL) {MGaugeSound = LoadLibrary("GaugeSound");}GaugePlaySound = (TGaugePlaySound)GetProcAddress(MGaugeSound,"GaugePlaySound");GaugeStopSound = (TGaugeStopSound)GetProcAddress(MGaugeSound,"GaugeStopSound");TerminateSounds = (TTerminateSounds)GetProcAddress(MGaugeSound,"TerminateSounds"); if(Alarm_pos == 1) (GaugePlaySound)("SoundAlarm.wav","alarm",1); else (GaugeStopSound)("alarm");break;}Any help would be appreciated.Rob

I was never able to get gaugesound.dll to work correctly in a Microsoft C++ environment. Had exactly the same problem you note.I gave up on it. Bought myself a DirectX textbook and started with this excellent example:http://library.avsim.net/esearch.php?DLID=...eira&CatID=rootThe only real downside is having to downlaod the rather massive DirectX SDK...Doug

  • Moderator

Like Doug said, it seems not to work in my MSVC++ .NET 2003 compiler either. Works just fine with the MinGW compiler of course.However, TerminateSounds works just fine. Unfortunately, it will stop ALL sounds currently being played with the GaugeSound.dll, but...

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Yeah, instead use DxSound.zip, which you can find here on AVSIM I believe.It is very easy to use, and then you don't have to learn DirectSound. You just load sounds when the panel loads, then use them in callbacks, and then free buffers as the panel unloads.

I am not using the VC++ envionment, but compiling using that which comes with Dev Studio 6.Any ideas?Rob

Isn't that an older compiler? Why not use the new one, especially since you can get a free version of it. Why make life harder than it has to be.

  • 7 months later...

Nice find.Glad you didn't figure this out 2 years ago, or I wouldn't have forced myself to learn DirectSound, haha. =)Now I'm free to do whatever I want sound-wise.

  • Moderator

>OK, eight months later I think I have it figured out...>Enable "String Pooling" in the VS environment:Jesu, Maria, Guiseppe! I would NEVER have thought to look there...Great find! ;)Now I'm off to fix a bunch of gauges that need this... If I'm ever in your neck of the woods Doug, I own you at least a couple cases of your favorite beverage! :-beerchug

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.