Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. [Message Deleted]

[Message Deleted]

Scheduled Pinned Locked Moved C#
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hkjghkj1
    wrote on last edited by
    #1

    [Message Deleted]

    H D 0 3 Replies Last reply
    0
    • H hkjghkj1

      [Message Deleted]

      H Offline
      H Offline
      Henry Minute
      wrote on last edited by
      #2

      It depends, on what you mean by a little delay. Don't forget that it has to find and load the file.

      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

      1 Reply Last reply
      0
      • H hkjghkj1

        [Message Deleted]

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        Don't use Media Player. If you want instantaneous sound, look into DirectSound in the DirectX SDK, for an easier version, the XNA Framework.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008

        1 Reply Last reply
        0
        • H hkjghkj1

          [Message Deleted]

          0 Offline
          0 Offline
          0x3c0
          wrote on last edited by
          #4

          If the URL is hardcoded, then you could in theory use a background thread which loads it into a MemoryStream before you click play. Then you could set up a System.Media.SoundPlayer(Stream) instance when button1 is clicked. Load the rest of the file into the MemoryStream and invoke the Play method

          Between the idea And the reality Between the motion And the act Falls the Shadow

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups