Introduction
I created a class using mciSendString functions
to play audio files then compile it to dll file. To use my dll file, please add
MediaControl.dll to your project reference then declare an instance as
following:
private MediaControl.AudioPlayer MyPlayer = new MediaControl.AudioPlayer();

In the following table you can read about some commands of the player as examples.
Command |
Explanation |
Example |
|
Open |
Open music file. (*.mp3, *.ram, *.wav, ...) |
MyPlayer.Open(FileName); |
|
Play |
Play music file. |
MyPlayer.Play(); |
|
Pause |
Stop the song temporary. |
MyPlayer.Pause = true; |
|
Close |
Stop playing. |
MyPlayer.Close(); |
|
Volume |
Set and get volume. |
MyPlayer.Volume = Value; |
|
Position |
Set and get position. |
MyPlayer.position = Value; |
|
Duration |
Get the duration. |
label1.Text = MyPlayer.Duration(); |
|
SetAudioOff |
Set voice off. |
MyPlayer.SetAudioOff(); |
|
SetAudioOn |
Set voice on. |
MyPlayer.SetAudioOn(); |
After extract the file MyPlayerC.zip You can
find MediaControl.dll file in (..\..\MyClass) folder, You can read about
commands: Play, Pause, Stop, ... etc. and read the code in my project for using
my AudioPlayer class. You can test my project with the file ..\..\Music\M1.mp3
or any audio file and see how using MyPlayer.PositionChanged to make motion
without new Timer.

deepak yadavPosted Jul 4, 2013, 9:41 AM
please send me(MyPlayerC.zip ) on my mail id [email protected]
Test TestPosted Jun 9, 2012, 1:52 AM
Have a look at this .net sound audio library we found, and it is working well for us. It is in budget too! http://www.dotnetfiles.com/Control/5/sound-library.aspx
Mostafa KaisounPosted May 30, 2012, 2:55 PM
You can see (MyPlayerC.zip) with URL: http://www.c-sharpcorner.com/UploadFile/M.%20Kaisoun/audio-player-class-with-C-Sharp/ I sent this file to you using your email ([email protected]) but I think this email not correct. Thanks.
Renjith PPosted May 30, 2012, 7:31 AM
can you please publish MyPlayerC.zip or mail me to [email protected]
Renjith PPosted May 30, 2012, 7:30 AM
can you please publish MyPlayerC.zip or mail me to [email protected]
Renjith PPosted May 30, 2012, 7:30 AM
can you please publish MyPlayerC.zip or mail me to [email protected]
Renjith PPosted May 30, 2012, 7:30 AM
can you please publish MyPlayerC.zip or mail me to [email protected]
Renjith PPosted May 30, 2012, 7:30 AM
can you please publish MyPlayerC.zip or mail me to [email protected]
Renjith PPosted May 30, 2012, 7:30 AM
can you please publish MyPlayerC.zip or mail me to [email protected]
Mahesh ChandPosted Apr 29, 2012, 5:55 PM
Awesome. Thanks for sharing Mostafa.
Mostafa KaisounPosted Apr 29, 2012, 2:59 PM
When sent this blog I sent two files: MyPlayerC.doc for this article, and MyPlayerC.zip which include MediaControl.dll and a project to test it. Why MyPlayerC.zip not published?!
VicZ ThachPosted Apr 29, 2012, 2:13 PM
create. that cool, but i don't see your dll. Please contact me, email: [email protected] thank you so!