[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2952
  • 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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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