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.

PlaySound from winmm

Featured Replies

Hi!I wanted to add a simple AP - disconnect sound to my gauge.So I was looking for a easy sound function and found the WinAPI function PlaySound.PlaySound("SOUNDcaapdis.wav", NULL, SND_FILENAME | SND_ASYNC | SND_NODEFAULT);This function works fine in the gauge.But I was wondering why nobody uses this function although it is so easy to use. So, is there a problem with this function is connection to gauges and Flight Simulator?Regards,Harry

  • Moderator

None that I'm aware of, although for AP disconnect it would have been simpler to modify your sound.cfg file:[AP_DISENGAGE_SOUND]filename=ccapdiscmaximum_volume=10000

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

At one time there was a problem using Playsound with certain sound cards (SoundBlaster) but I don't know if that still applies to current hardware.Fred

Hi!Thanks for your answers.So Playsound seems to be OK. I'm really wondering why things like fssound.dll were used so often if the way is that easy.@Bill: The AP is a generic gauge, so it should play the sound itself without the help of a sound.cfgOtherwise yourapproach would be the easiest.Harry

If you need to do more than a simple one-shot sound effect, for example looping a sound, or having a sound depend on a variable such as engine rpm, you need more than this function.

  • Moderator

>If you need to do more than a simple one-shot sound effect,>for example looping a sound, or having a sound depend on a>variable such as engine rpm, you need more than this>function.Well, that's not precisely correct, Patrick!To play an gyrosound that loops we could write:PlaySound("gyro.wav", NULL, SND_FILENAME | SND_ASYNC | SND_LOOP);Only one sound can play at once so if you play another sound before the first is finished it will be cut off. You can also stop a sound playing by passing NULL as the pszSound parameter.That last is the real problem with PlaySound: only one sound can play at once!

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Fred, I think you're correct that there is still an issue with PlaySound and Vista drivers for some SoundCards. Not sure that this has been resolved. I can't get PlaySound to work on a 680i MB (on-board sound) in Vista..but it works fine on the XP partition (same PC)RegardsJim

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.