[2008] System.Media.SoundPlayer Play Embedded File?
Nov 6, 2008Public soundPlay As New System.Media.SoundPlayer How do I play an embedded resource wav file.
View 3 RepliesPublic soundPlay As New System.Media.SoundPlayer How do I play an embedded resource wav file.
View 3 RepliesI am using the following code to play sounds in my VB.NET application: [Code] now this works fine for any sound file. However there is a second sound file (sound2.wav) which I want to play sometimes too. I want sound2 to have priority over sound1, however if I play sound2 using this method and then sound1 also plays a second later, sound2 will be canceled for sound1 to play.
So I'd like to know if there's a way to either play both sounds at once, or to check if sound2 is playing before I play sound1, and then only play sound1 if sound2 is not currently playing.
I'm writing a simple little program in VB.NET that has to play two sounds - at the same time.The problem is, that when I call SoundPlayer.Play() twice in immediate succesion, it seems that the latter call sorts of "takes over" the thread that is created by the first call, instead of creating a new one, like it says it should do in the docs.I'm using the following code:
Private Sub Button_OFD_Sound1_Browse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_OFD_Sound1_Browse.Click
LoadSound(OFD_Sound1, TextBox_OFD_Sound1_SelectedFile, SoundPlayer_Sound1)
End Sub
[Code]...
Im trying to open media player (full screen) and play a movie. When i create the file path like so: Dim MoviePathVTS As String = String.Concat("""" + tempMoviePath, " \VIDEO_TS\VTS_01_1.VOB" + """")
It wont play the file but if i do it like this: Dim video1 = """F:\Movies\DvD\Angels and Deamons\VIDEO_TS\VTS_01_1.VOB"""
It plays fine? the file paths are the same including the extra "" but it just refuses to play. I need the top one because i have many movies in a treeview.
Heres my code
Private Sub watchNow_Click(ByVal sender As Object, ByVal e As EventArgs)
'get the position of the selected node
Dim i = movieTreeView.SelectedNode.Index
[CODE]...
I have some .wav files in my program in a "resource". I can successfully play them, but I want a user to be able to select them from a combo box. [code] The & sign says "Identifier expected". How can I get the combobox text into that variable?
View 3 Replieshow to play video or audio in a vb.net application but have come up with not a lot.
I want to create a program that accessing a web server (no problem on that) and will pick up audio and video that is stored on that server.
Or, maybe do a live broadcast where I can play my guitar and sing a song. (Promise if I get this done through here I will give you a live performance) on that note I am sure you will all hold back.
This is a little open and wide, but what I would like to know via a webserver is this possible
1.Video
2.Audio
3.Live broadcast
I have 28 mp3 and 28 wav files. A Treeview allows user to select "Matthew" then click on a chapter and that chapter plays. What I want to accomplish, is to allow the user to click on "Matthew" in the treeview and the m3u (playlist) plays the entire Audio
Book of "Matthew".
I have researched the forums, tried numerus examps, checked out MSDN examps and Learn and still cannot find a way to accomplish what I want.
I m trying to create media player .i want to add an swf file in current running video file at the top of my video player or bottom of my video.
View 2 RepliesPlay a mp3 file without adding a Windows Media Player Control
View 5 RepliesI want to play a WMV file without using a Windows Media Player Control.
View 39 Replieshow can I play a MP3 file without using Windows Media Player or Direct Sound? I cant use DirectX even if I wanted to! Is there any other way? I could not use DirectX because I could not install the DirectX Software Development Kit on a 64 bit system!
View 8 RepliesI'm using the windows media player (wmp.dll) in vb.net 2008 and would like to know if it's possible to play a specific portion of the video. For example, I would like to start to play the video X minutes from the start and for Y amount of time.
View 1 RepliesI'm using the windows media player (wmp.dll) in vb.net 2008 and would like to know if it's possible to play a specific portion of the video. For example, I would like to start to play the video X minutes from the start and for Y amount of time.
View 1 RepliesI get an unhandled exception when I use a windows media player control on the form in order to play a movie file.It only happens when I run the program. But in debug, the error does not occur. What do I do?
View 4 RepliesI have an application with an embedded media player. I would like to be able to load music files from a cd into my file system for use by my application. I am confused about the .cda file extension on music files. Is there a way for me to actually load the music files directly from the cd using vb.net 2003.
View 4 RepliesFor those that have wanted to play around with embedded microcontrollers and use VB - you are now in luck.
With the version 4.2 of the .NET Micro framework Beta release - VB Support is now present.[URL]..Its still in Beta with a few known issues being worked on but is a new platform and fun to tinker around with software and some electronics.
Is there a way to add a Full Screen button to the embedded media player? I know that you can add a 'button' that will set it to full screen after it is running, or you can add code that will make it go full screen, but is there a way to actually put a button in the embedded player to make it go full screen?
View 2 RepliesCurrently trying to do it with the wmp component but not sure how to get it to point to the resource file...
View 10 RepliesWhat is the preferred method for embedding an audio player with a URL and hiding that URL from the user? I understand anything that gets to the client can eventually be seen by the client but I would like to know if anyone has any recommendations for this problem. What have you used for similar situations?
View 2 RepliesI have the following code which will play a wav file saved on a disk in an embedded media player
[code]...
Was wondering if there is something similar to the System.Windows.Media.FormattedText object that i can use to format a string of text and then draw it to an System.Drawing.Image object.
This is a windows forms app so don't really want to use this wpf component if i can help it.
I made a program that plays several streams, and radio stations from its online sources. Some streams WMP can play, and some only quicktime can play. Currently, I am using the dll libraries for wmp and quicktime and compiling them with my program. it works but it's very laggy and it causes problems in other computers.So, my question, Do you guys know a library to play most media types? so I would have only one dll file.
View 2 RepliesIm working on a media player for my work. It is suppose to be a song randomizer. I do have this mostly working. My issue is getting it to correctly switch songs when one ends. I just dont know why it is half working and half not. So my issue, after much debugging, which i have kept in my code i will post, i have found that when the song changes, the song does change, the index in the listbox goes up one and the 2nd song starts playing. I should note that i do have the code for playing the next song.
View 1 RepliesI have a media player component to on a form and would like to resume play after pausing can someone help me with this?
hereis my
Public Class Form1
Private Sub PlayPause_btn_Click(sender As System.Object, e As System.EventArgs) Handles PlayPause_btn.Click
If wmp.playState = WMPLib.WMPPlayState.wmppsUndefined Or wmp.playState = WMPLib.WMPPlayState.wmppsStopped Or then
[code]....
Can I get windows media player to play files from my resources?
View 1 Repliesi created a media player in vb.net. i have a listbox as playlist. My problem is i have picturebox1 in which if i have to click shuffle the items in the playlist (listbox) will shuffle songs. Also, the playlist must automatically play songs.
View 5 RepliesI got a Media Player with playlist (listbox). When the track or video ends, I want the program to automatically play next track (or video) ib playlist.
Here's my code:
If AxWindowsMediaPlayer1.playState = WMPLib.WMPPlayState.wmppsMediaEnded Then
Playlist.SelectedItem = Playlist.SelectedItem + 1
AxWindowsMediaPlayer1.URL = Playlist.SelectedItem
End If
I have a table on SQL Server 2008, I saved on it videos and audios as binary.I have to play these media (videos and audios) on my website.Can I do that?Is there a way that I could request the media as a link? so I can embed it...
View 1 RepliesIm making a media player and have a listbox and a player so I need to make the media player play the next song in the list box btw I have a list of strings named fullfilepaths because the listbox displays name and duration
heres the code:
Private Sub AxWindowsMediaPlayer1_PlayStateChange(ByVal sender
As Object,
ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent)
[code]....
I'm going to build a video player in vb.net, but during the development I've met some complications.
1) The windows media player ocx takes a long time to play the first video, I think for a problem of initialization
2) The window media player ocx doesn't play flv files
The alternative or possible solutions.
1) insert flv codec into the project for window media player ocx, but how?
2) use the flv component, but I don't know with precision what is the right code to use to play video files with the vlc component and sometimes during the dispose of the vlc instance, the system give me a blue screen.....
I know that there are two wrappers for the vlc componet the libvlcnet and the VideoLan DotNet for WinForm and WPF, but i don't find any example on how ti implement and use them in vb.net. Use the ffmpeg video conversion engine for window media player, but how can I implement ffmpeg in vb.net, is there any wrapper or activex for ffmpeg open source?