473,320 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Play a sound

I need to play a .wav file from my program. I know how to do it from a
regular desktop program but have no idea how to do it from asp.net. My
application regularly plays short (4 seconds or less) wave files depending
on the results of an input. I'm about to start the conversion from the
normal fat client to an asp.net version and the playing of a wav file is
esential. Any ideas?

Rick Lederman
www.soaringsoftware.com
Nov 19 '05 #1
3 6135
Rick Lederman < ri**@soaringsoftware.com > wrote:
I need to play a .wav file from my program. I know how to do it from a
regular desktop program but have no idea how to do it from asp.net. My
application regularly plays short (4 seconds or less) wave files depending
on the results of an input. I'm about to start the conversion from the
normal fat client to an asp.net version and the playing of a wav file is
esential. Any ideas?

This is not something you can accomplish with ASP.NET, per se, as it is
technically can only spit out HTML to a client. Presumably, you will have
to use ASP.NET to output a javascript function to play a sound. Sorry, I
don't know how to do this personally, but google "play sound javascript".
Nov 19 '05 #2

"Rick Lederman" <ri**@soaringsoftware.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I need to play a .wav file from my program. I know how to do it from a
regular desktop program but have no idea how to do it from asp.net. My
application regularly plays short (4 seconds or less) wave files depending
on the results of an input. I'm about to start the conversion from the
normal fat client to an asp.net version and the playing of a wav file is
esential. Any ideas?

Rick Lederman
www.soaringsoftware.com

You can put a <bgsound id="sound1" runat="server"/> on your page and then in
code put the following.

Protected sound1 as htmlgenericcontrol
sound1.attributes("src") = "../yourwavefile.wav"

if you want nothing to play then you just reset it to
sound1.attributes("src") = ""

hope this helps
Mike
Nov 19 '05 #3
Hi Rick,

I think Jeff and Mike's suggestions are reasonable, playing a background
sound is something of the HTML web's capability and in asp.net , we also
make use of that feature. And also, different browsers may have different
html tags or elements to do that. Here is a kb on how to add background
sound in IE:

#How to apply a background sound to a Web page in FrontPage
http://support.microsoft.com/default...b;en-us;297477

Hope also helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: | last post by:
Hi everybody. Need your help. How can I play sound (.wav-file / camera click) on mouseclick? TIA willy wuff ...
1
by: svpsiva | last post by:
How to play sound in j2sdk1.4.2_07??
0
by: yuen | last post by:
How to play sound by C# without using WMP?
0
by: seo gang ho | last post by:
this is my source :$ (tone generator) how to play sound in outputbuffer? please help me...teach me detail...:$ using System;
1
by: Lam | last post by:
how can I play sound file in a .aspx page written in C#? I try to use the code like the following. But whenI call the play function play("sound.wav", this.SND_ASYNC) my computer give out "be"...
10
by: CM | last post by:
Hi, I used to use the following code to play sound in VB6: Public Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _ (ByVal lpszSoundName As String, ByVal uFlags As...
1
by: tinmaung | last post by:
hi please help me i want to know how to play sound in java application i don't mean java applet if you can, please send me how to write coding to play sound in application.
1
by: anuvanand1 | last post by:
I am in need of user defined function for Play sound .........
3
by: jamessarvs | last post by:
Windows Media Player cannot play the file because there is a problem with your sound device. There might not be a sound device installed on your computer, it might be in use by another program, or it...
1
by: nicolecastel | last post by:
Hello I want to play sound in three external sound cards at the same time,I mean when I click in a button I can hear sound from three speakers which are related to my three sound cards. I have a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.