Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2969
  • Last Modified:

hou to play .wav audio file in asp.net application

hou to play .wav audio file in asp.net application
0
polythought
Asked:
polythought
  • 3
  • 3
2 Solutions
 
YZlatCommented:
or

Public Declare Function playa Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Public Sub PlayWav(sFile As String)
    If Dir(sFile$) <> "" Then Call playa(sFile, SND_FLAG)
End Sub

PlayWav("c:\myfile.wav")

0
 
Elvio Lujan.Net Senior DeveloperCommented:
you can make a link with the url where is the wav files

<a href='....file.wav'>play</a>
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
ThargolCommented:
Use an object-tag to embed windows-media player in your html-page and point it to the url of the wav-file.

See the this link for an example:http://www.mioplanet.com/rsc/embed_mediaplayer.htm
0
 
ThargolCommented:
Hi TheLeaderone,

The comments from YZlat or not a solution the problem.
My solution and the one from lem2802 would work.

Regards,
Richard
0
 
YZlatCommented:
Thargol, could you do me a favor and explain what is wrong with my solution
0
 
ThargolCommented:
Hi, yZlat

Your solution is for vb.net, so a client application. The question was for asp.net, so a server based web application.

Btw in vb.net 8 (Framework 2.0) you can play audio in vb with the following line:

my.Computer.Audio.Play(filename)

But again this is not a way to play audio in a website.

Regards,
Richard


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now