Tancuyuschij Medvedj Dlya Winamp

admin
Tancuyuschij Medvedj Dlya Winamp Average ratng: 10,0/10 2218 votes

Jul 6, 2013 - Keratin in Albany and Latham NY, then hopefully you have noticed our Keratin Special during the month of July at all three of our locations! Je kunt ons altijd mailen of bellen. Als je ergens niet uitkomt, als je opmerkingen hebt of tips, of als je het gewoon even over live muziek wilt hebben.

> > - - - / - - / - - / - - / - - - Delphi tutorial: Playing.WAV files with MediaPlayer. (Level Three) This is still in a draft form. It is probably mostly right, but I make no promises just yet!!! This has good information, and there's a search button at the bottom of the page. Please don't dismiss it just because it isn't full of graphics, scripts, cookies, etc!

If you want to know more about the source and format of these pages. Tests Dt3f: Playing.WAV files with the MediaPlayer This is a level 3 tutorial not because it is very complicated, but because the issues are significant to a small group of programs.

As usual, set up a directory for the exclusive use of the application we will develop during this tutorial. COPY (don't MOVE!) into it at least two.WAV files.

I used ding.wav and chimes.wav which, in my in Windows 3.1 machine, were in C: windows. Files you are going to play do not NEED to be in the application's directory, but it pays to eliminate distractions when exploring a new topic.

Don't start Delphi yet! FIRST: make sure that you speakers, soundcard, etc, etc are all behaving. You may be able to hear the WAV files simply by double clicking on the names from within Windows Explorer. Failing that. Win 3.1: Control Panel Sound. Navigate to directory your.WAV files are in.

Click 'Test'. CLick CANCEL. Otherwise you'll reassign the sound you tested to the event that the Sound app had selected. Win 95: Depending on how your computer was set up, you may have. Programs Accessories Multimedia Media Player available for making sure everything is ready.

Start Delphi. Put two buttons on the form. Name them buPlay1 and buPlay2; caption them 'Play 1st sound' and 'Play 2nd sound' (or somesuch!) (This is written for Delphi 1, by the way.) From the System tab of the component pallet, add a MediaPlayer component to your form. (The icon is two musical notes and a bit of movie film).

Now create an OnClick handler for buPlay1 as follows. MediaPlayer1.filename:='ding.wav'; MediaPlayer1.open; MediaPlauer1.wait:=true; MediaPlayer1.play; MediaPlayer1.close; Get that working. By the way: the following is functionally equivalent and more elegant. With MediaPlayer1 do filename:='ding.wav'; open; wait:=true; play; close; end;(*with*) Now make an OnClickHandler for buPlay2 which is identical to the one for buPlay1, except set filename to the other.Wav file. Don't try to use the bar with 'play'/'stop','rewind', etc buttons just yet. Some details. The open method accesses the MediaPlayer, getting it ready to do something.

Later on, the close is important as it releases the resources tied up when you did 'open'. You might think you could avoid the constant opening and closing as follows: In the form's OnCreate handler, 1) Assign a valid filename, e.g. Ding.wav to MediaPlayer.filename 2) Do MediaPlayer1.open In the form's OnClose handler include MediaPlayer1.close; However, this DOESN'T WORK, as even if you change what is in MdiaPlayer1.filename, the sound you get from Play remains the same. If you try to open the MediaPlayer without first supplying a value to MediaPlayer1.filename, the attempt to open fails. In any case, I prefer opening and closing things when I need them, rather than having them open throughout. (Similar issues arise when you work with data files.) The MediaPlayer1.wait:=true just before MediaPlayer1.play is important.

It stops the program from going straight on to MediaPlayer1.close. Take out the wait:=true and your program will still run, but you won't hear any sounds. They are stopped within milliseconds of being started. The wait:=true has to go just before the Play. For our simple demo, it would be best to use the object inspector to set MediaPlayer1.visible:=false; However, if you want to play with the player buttons, you just need to do two things with the object inspector: 1) Put the name of a suitable file in MediaPlayer1's filename property, and 2) Change MediaPlayer1's AutoOpen property to 'true'. Now if you click on the 'Play' button on the row of buttons which are the visble part of MediaPlayer1, you should hear the wav file played. Tom, Chichester, England zip file with source code.