Writing A Program Which Plays Audio Using A Windows Media Player Control?
Oct 11, 2009
I'm writing a program which plays audio using a windows media player control. It's quite basic but I'm running into a problem.
Soundplayer.Ctlcontrols.play()
Sleep(3000)
For some reason when this appears in my code, the sound doesn't start playing until AFTER the sleep. I have music running in the background, using another windows media player control, that continues playing just fine.
Basically, I want nothing else to happen for the duration of the sound, hence the sleep, so how can I make it so my sound starts playing BEFORE the sleep?
I am attempting to play a set of audio files continuously using a tree view. I am having troubles looping through an array to play one song after another in the selected parent node. It seems to work if I only use one song in the array but it doesn't want to actually loop through and keep playing; it goes through the loop but once the first song is over it stops. I am unsure if looping through an array in the AfterSelect sub routine is the best way of doing this,
Here is the entire Sub routine for the AfterSelect on the tree view.trvMain is the name of the entire tree view.wmpMain is the Windows Media Player COM.trvJazzHancock is the parent node for the two audio files I'm attempting to loop.
I'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.
i used to code with vb6 but now im using the new windows 7rc so im trying the new .net
Anyway So i uploaded a few songs to my webhost and i would like to play them in media player i know i can do this (Ply1.url = "blah.com") but how would i play the next song on my server as if i add one more track to it. it just seems to play the first and with no next button
I am trying to build a language tool, basically I am getting lines of text into a richtextbox and playing the audio for that line. Things are working great except that I want to highlight the text being played and autoscroll when it plays the next line. how to implement the line highlighting and autoscrolling.
It's usual to see hoe to build a player with the AxWindowsMediaPlayer.
But in this occasion, I'm interested in control de Windows Media Player from Windows 7 with my own application.For example, I want to create a button that is able to pause or play the video that I'm watching with the WMP.
I want to know if its possible to get song information (Artist, Song Name, ect.) from the Windows Media Player Control in VB 2008. I have the control on the form and I want the program, if a song is playing, to be able to get the information above (most importantly artist) and put it in a textbox.
I am developing an application to play sound effects. I intend to have four seperate channels that can each play their own file.Seems a bit slow - can I buffer the files or is there an alternative to the Url property?Can I drag-drop onto this control? I have set the AllowDrop property to true, but I cannot find the event handlers for DragEnter, DragLeave and DragDrop that need to be handled to allow dragging and dropping.Is there a way to fix this or do I need to find an alternative? If I need an alternative, it must Be able to play any type of media file - mp3, wav, ideally midi.Have adjustable pan and volume?Be able to loop a track?Be quick at loading a file??Be able to mute?Ideally have some form of VU meter or something like that.?Be able to be dropped on to.The other thing that would really be awesome would be if I could have an option that would route each player to an individual output on the sound card; I have an 8-out sound card, and it would be great if I could send player one to outputs 1/2, two to 3/4 and so on.
I am trying to created a simple media player program. I have a Windows Media Player control on a form (renamed it wmp1) and a listbox that creates a list of filenames from a given folder location.When i click on a filename from the listbox, i set the wmp1.url to the filename in the listbox and all is good as the wmp1 control automatically plays the file chosen form the listbox.
Having worked out how to make a Windows Media Player in VB 2008, I have a new problem of exporting the file and debugging to play the music. I can add midi/mp3 files to the resources section so it works when I press f5 in VB itself, but opening from the debug folder (to save for other computers) loses all the music.
having lot of problems playing a video on a form.Is there a better control for viewing videos than windows media player? For video resource files, what should the build action be? Will a form which has a 32-bit windows media player control on it work on a 64-bit computer?For some reason, the following code does not work:
If System.Diagnostics.Debugger.IsAttached() Then strVidFilePath = System.IO.Path.GetFullPath(Application.StartupPath & ".... esources")[code].....
I'm writing an application in VB2008 that monitors 4 different live audio streams using the Windows Media Player 11 control. What I'd like it to do is if audio is coming in on one of the streams, it would mute all the others. I can't find a way to determine that audio is playing in any of the streams. If there was a way to access the equalizer (somehow that must be do-able since the visualizations have access) I think I'd be set. And I'll pay for a control if there's something else out there which can handle live streaming audio (the audio is available in WMP, Real, and WinAmp format).
I have been trying to tweak the form and all of a sudden it doesn't show anymore. I have tried reversing all the settings back to original but nothing. Then I have tried:
I published a VB.NET 2008 program that contains a Windows Media Player. The code I used to play a wav file was AxMediaPlayer1.FileName = "song.wav". After publishing the program, when it is supposed to play the wav file, I get the following error: Error HRESULT E_FAIL has been returned from a call to a COM component.
I am trying to play some WAVs within Media player and am confused at the order my code performs tasks in.
I need to use Windows Media player as my WAVs are 8 channel and just playing the WAV without using media player doesn't seem to support this.
I have a form with a button and a media player component on it
Her's my code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click AxWindowsMediaPlayer1.URL = ("C:ASOwl1.Wav")
I want to insert a Windows Media Player object in my Form, but I have not the control on my Toolbox.
I have done the steps:
Right-click the Toolbox -> Choose item -> COM Components -> add Windows Media Player component (which references to C:WindowsSystem32wmp.dll)
But there is not the control on my Toolbox.
In my project references I see "MediaPlayer" into "Imported namespaces" and it is checked. In the references window it is also present "Windows Media Player". Where is the error?
I have looked all over the internet to find specifically what the title says and i cant find anything that will work and is what i want, it's mostly all vb6. so even more specifically i am creating a program that captures screenshots of the "axwindowsmediaplayer" control at what ever frame or part of the video it's on. i also noticed that there is a command in the little menu when you type in "axwindowsmediaplayer.capture" i don't know how to use it?
I have an application that is currently playing videos through the windows media player control from a website. I want it so that a button I have created, when clicked will make the wmp control full screen.
I have created a small media player calling COM component of Windows media player. Now i want to cut and save the audio files played in media player? is it possible with windows media player or i would have to use some other media player object? I can have the files info which i am using in window media player to play..but cant able to get the details which we can finds with our OS( windows) like compression format, bit-rate etc.
One of the things my VB.NET program does is play video files using the Windows Media Player component that comes with VB. My program also switches the WMP component to full screen but once in a while the form will be on top of the full screen video. I am hoping that you fine and knowledgeable folks cat this from happening. The problem occurs when the next video file is played automatically. I'll do my best to post a bit of code but since I don't have much of an idea what might be causing this I'll just have to guess. The project has gotten quite large over the years I've been writing it and if any more code ito post any or all of it, though I'm sure no one would like to go through all 1771 lines of it.
Private Sub WMP_PlayStateChange(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) Handles WMP.PlayStateChange If Stopping = True Then
I'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.
When I attempt to drag a WMP control from the toolbox this error arises: [code]Has anyone had this problem? I was able to add this component previously, however this was on my desktop computer.
I 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?