Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8001393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:04:57+00:00 2026-06-04T16:04:57+00:00

I’m using this code to play a WAV file from a resource, and the

  • 0

I’m using this code to play a WAV file from a resource, and the audio plays correctly, but then I get a short blast of static after it plays (about 1/2 second):

//System.Media.SystemSounds.Beep.Play();
SoundPlayer sndPlayer = new SoundPlayer();
sndPlayer.Stream = Resources.Notify;
sndPlayer.Play();

If I uncomment the System.Media.SystemSounds.Beep.Play() line above, then the beep and the Notify sound from my resources both play correctly, and no static. I’ve tried a few different variations of the above code, and always getting the static. I tried making all of the variables static, incase there was something related to early garbage collection, but that didn’t help.

The WAV file is just one I copied from c:\WINDOWS\Media\ding.wav (on Windows XP) and it plays fine in Windows Media Player. Also, if I use new SoundPlayer("c:\WINDOWS\Media\ding.wav"), it plays correctly from the file.

I imagine it has something to do with the UnmanagedMemoryStream that Resources.Notify is, and maybe I need to load it in to a managed stream first? I know I’ve had issues with PNG files if I don’t use new Bitmap(Resource.MyPNG) and try to use Resource.MyPNG directly instead, so maybe something similar with WAV resources?

Update : I originally thought it was happening everytime the sound played, but now it appears it only happens the very first time I play the sound in my app. So maybe some initialization needs to be done?

I also tried this, same issue:

SoundPlayer sndPlayer = new SoundPlayer(Resources.Notify);
sndPlayer.Play(); 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T16:04:58+00:00Added an answer on June 4, 2026 at 4:04 pm

    Was just an issue on one PC. Never figured it out, and other apps don’t appear to have this issue, but not worth my time if only on 1 PC (out of maybe 15 tested) so far. Will report a better answer if I ever get one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
Does anyone know how can I replace this 2 symbol below from the string
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.