473,566 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sound with New System.Media.So undPlayer()

When I run the following code it does not play on the client. When the
server and client are on the same machine it plays??? Any help from
anyone???

Dim errorSound As New System.Media.So undPlayer()
errorSound.Soun dLocation = ErrorLocation
errorSound.Load ()
errorSound.Play ()

Nov 14 '06 #1
9 7697

"Roger" <ro*********@ho tmail.comwrote in message
news:11******** *************@m 7g2000cwm.googl egroups.com...
When I run the following code it does not play on the client. When the
server and client are on the same machine it plays??? Any help from
anyone???

Dim errorSound As New System.Media.So undPlayer()
errorSound.Soun dLocation = ErrorLocation
errorSound.Load ()
errorSound.Play ()
Hi,

What is the content of ErrorLocation when you are on your server and on the
client?


Nov 14 '06 #2

Robinson wrote:
"Roger" <ro*********@ho tmail.comwrote in message
news:11******** *************@m 7g2000cwm.googl egroups.com...
When I run the following code it does not play on the client. When the
server and client are on the same machine it plays??? Any help from
anyone???

Dim errorSound As New System.Media.So undPlayer()
errorSound.Soun dLocation = ErrorLocation
errorSound.Load ()
errorSound.Play ()

Hi,

What is the content of ErrorLocation when you are on your server and on the
client?
Client: "C:\Websites\Ti meSheets\wavs\c ompute.wav"

Server: "F:\Intranet\Ap plications\Time Sheets\wavs\com pute.wav"

I get no errors on both, just no sound from the server, so it is
finding the wav file on the server. I know becuase I got errors with
different paths before on the server.

Nov 14 '06 #3
Try this:

My.Computer.Aud io.Play(ErrorLo cation, AudioPlayMode.B ackground)



Nov 14 '06 #4

Robinson wrote:
Try this:

My.Computer.Aud io.Play(ErrorLo cation, AudioPlayMode.B ackground)
Thanks for your help but I get a message somthing like Audio is not a
member of My.Computer. How can I get it to be a member?

Thanks,
Roger

Nov 14 '06 #5

"Roger" <ro*********@ho tmail.comwrote in message
news:11******** **************@ b28g2000cwb.goo glegroups.com.. .
>
Robinson wrote:
>Try this:

My.Computer.Au dio.Play(ErrorL ocation, AudioPlayMode.B ackground)

Thanks for your help but I get a message somthing like Audio is not a
member of My.Computer. How can I get it to be a member?

Thanks,
Roger
What version of Visual Studio/.NET are you working with?
Nov 14 '06 #6

Robinson wrote:
"Roger" <ro*********@ho tmail.comwrote in message
news:11******** **************@ b28g2000cwb.goo glegroups.com.. .

Robinson wrote:
Try this:

My.Computer.Aud io.Play(ErrorLo cation, AudioPlayMode.B ackground)
Thanks for your help but I get a message somthing like Audio is not a
member of My.Computer. How can I get it to be a member?

Thanks,
Roger

What version of Visual Studio/.NET are you working with?
Visual Studio 2005 Professional Edition, Is there a way to add audio to
My.Computer?

Nov 14 '06 #7

"Roger" <ro*********@ho tmail.comwrote in message
news:11******** **************@ b28g2000cwb.goo glegroups.com.. .
>
Robinson wrote:
>Try this:

My.Computer.Au dio.Play(ErrorL ocation, AudioPlayMode.B ackground)

Thanks for your help but I get a message somthing like Audio is not a
member of My.Computer. How can I get it to be a member?

Thanks,
Roger
Ahhh is this a website or a web control library? My.Computer.Aud io isn't
available in those kinds of project. If this is a web site, you need to
specify a URL, rather than a file path ( I suspect ) with your media player
control, possibly file:\\\myserve r\bla\bla\bla or similar). I have not much
experience of ASP.NET, so others might be able to confirm.
Robin


Nov 14 '06 #8

Robinson wrote:
"Roger" <ro*********@ho tmail.comwrote in message
news:11******** **************@ b28g2000cwb.goo glegroups.com.. .

Robinson wrote:
Try this:

My.Computer.Aud io.Play(ErrorLo cation, AudioPlayMode.B ackground)
Thanks for your help but I get a message somthing like Audio is not a
member of My.Computer. How can I get it to be a member?

Thanks,
Roger

Ahhh is this a website or a web control library? My.Computer.Aud io isn't
available in those kinds of project. If this is a web site, you need to
specify a URL, rather than a file path ( I suspect ) with your media player
control, possibly file:\\\myserve r\bla\bla\bla or similar). I have not much
experience of ASP.NET, so others might be able to confirm.
Robin
Thanks for your help! I tried a URL but it still does not work, no
sound on the client machine????

Roger ;-)

Nov 14 '06 #9
"Robinson" <to************ ******@myinboxt oomuchtoooften. comschrieb:
Ahhh is this a website or a web control library? My.Computer.Aud io isn't
available in those kinds of project. If this is a web site, you need to
specify a URL, rather than a file path ( I suspect ) with your media
player control, possibly file:\\\myserve r\bla\bla\bla or similar). I have
not much experience of ASP.NET, so others might be able to confirm.
I don't think the mentioned methods ('SoundPlayer' and 'My.Audio.Play' ) are
intended for use in Web applications. In both cases the sound will be
played on the server and not on the client.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 15 '06 #10

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

Similar topics

5
3579
by: djc | last post by:
what choices do I have to play sounds in a program using vb.net? Or, I guess if nothing vb specific what windows API(s) should I look at? I am interested to find out whats needed for playing short wav files for sound effects as well as playing longer sound clips in mp3 format. can anyone point me in the right direction?
4
1867
by: Mateo | last post by:
Hi! does anyone know some good C# or VB.Net library for working with sound? I would need to do the folowing: - take audio file - create small sound distorzion (with some kind of classical filters) - save changed audio file It could be commercial library, ofkors.... I'm willing to pay the price...
3
2099
by: Devlei | last post by:
Can someone please point me in the right direction as to how to play system sounds and/or WAV files from a VS.Net 2003 application. I can find plenty of info about how easy it is with VS2005, but from VS.Net 2003 I can only find the Windows Multimedia article about the Statement: PlaySound("MouseClick", NULL, SND_SYNC). But how do I use...
6
1902
by: Jon B | last post by:
Hi There! How do I play a sound from Windows that get played when a USB device is plug-in or plug out? Many thanks in advance!! Jon
5
11064
by: gazza67 | last post by:
Hi, Does anyone know how to check for when a sound has finished playing? I am currently using the SoundPlayer, there doesnt seem to be any event for this - am I missing something? Gary
2
10792
by: anj2k5 | last post by:
I uploaded music file in SQl DB in a image dataype .But when i try to reterive it,It doesn't play. It gives the following type casting error on runtime "Unable to cast object of type 'System.Byte' to type 'System.IO.Stream'. I used the following code to play musicfile
1
5384
by: Jone | last post by:
Hello, Is it possible to play wav files slower or faster than the default speed of the SoundPlayer class does? I'm writing a small tool for guitarplayers and one feature would be a possibility to play Guitar riffs and solos in slower speed.
3
7785
by: Jack | last post by:
Hi, I'm writing a simple wav player (like winamp) and using the SoundPlayer class in c# 2005. Using winform buttons, I can begin playing the sound and stop half-way through the sound using: myPlayer.Play() and myPlayer.Stop() methods which works great, but i want to know when the sound actually stops playing (so I can change my button's...
8
14928
by: raylopez99 | last post by:
I have the latest version of Visual Studio 2008 Professional, which allows you to create resource files (this is the .resx file, no?), unlike the Express version, which does not. I am trying to cut and paste code that MSDN recommends for playing a simple wav file from inside an embedded file, like presumeably the 'resources' file .resx is. ...
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8108
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7644
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.