Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

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.

Playing Audio

Featured Replies

Hi Guys,

So I'd like to be able to play an audio recording of a person's voice.  I tried using the Functions.PlayScannerAudio() but I found out that there is a limit to the length of the audio apparently.  Any idea how to play the audio?  I really don't want to try to break up this audio to make it work, but I will if there is no other way!

Thanks!

 

 

 

I tried using NAudio back in the day, before the API had audio functionality, but it was causing crashes for a lot of people.

Maybe check with @Albo1125, he plays audio clips on his bank callout.

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

The simplest way is using System.Media.SoundPlayer:

        public static void PlaySound(string wavFileLocation)
        {
            using (SoundPlayer s = new SoundPlayer(wavFileLocation))
                s.Play();
        }

 

For what I needed, it was enough.

12 minutes ago, alexguirre said:

The simplest way is using System.Media.SoundPlayer:

        public static void PlaySound(string wavFileLocation)
        {
            using (SoundPlayer s = new SoundPlayer(wavFileLocation))
                s.Play();
        }

 

For what I needed, it was enough.

I agree, this is probably the best way if you're looking to play something simple :smile:

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

33 minutes ago, alexguirre said:

The simplest way is using System.Media.SoundPlayer:

        public static void PlaySound(string wavFileLocation)
        {
            using (SoundPlayer s = new SoundPlayer(wavFileLocation))
                s.Play();
        }

 

For what I needed, it was enough.

I feel like I should have known about that...lol.

But I've never had to work with playing audio files in my career before :tongue:

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

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.