Click here to Skip to main content
15,169,285 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have been using windows media player control in my application... But this take too much cpu usage causing other threads to pause for one or two seconds... Please suggest me any efficient and legal way to play audio and video files in C#...
Posted

Take a look at this: A low-level audio player in C#[^] and this: A full-duplex audio player in C# using the waveIn/waveOut APIs[^]

Hope it helps
p.d. Even more, the activeX media player control produces memory leaks.
   
v2
Comments
Sachin Athrady 13-Sep-13 6:20am
   
thx for ur reply.. thts just an audio player r8? i want a player similar to wmp but not wmp.. hope u understand it...
Please, discard previos solution as it is incomplete, did not pay much attention to the 'video' part. I was using the media player too in one application but was producing memory leaks and the client decided not to show help videos in the application.

Anyway there's one wraper project for the VLC library here: https://forum.videolan.org/viewtopic.php?f=32&t=58438&sid=e4f9d616bffd69d49e92f74bdace9dda[^] hosted in sourceforge here: http://sourceforge.net/projects/libvlcnet/[^]
   
Comments
Sachin Athrady 13-Sep-13 6:39am
   
just install it and add reference?
V.Lorz 13-Sep-13 6:50am
   
I just made simple tests at that time using sample code already available in the forum but did not continue with it as it was not needed any more for that application. On my PC I had VLC Media Player installed when I made the tests.
Sachin Athrady 13-Sep-13 7:15am
   
i dont understand it.. how can i use it in my as a player like i was using wmp...
V.Lorz 13-Sep-13 7:31am
   
Download the package from http://sourceforge.net/projects/libvlcnet/files/latest/download?source=dlp: and unpack it in your local hard drive. Locate the folder named 'trunk' and open the solution file (libvlcnet.sln) you'll find there. There's one sample winforms application named 'simple-player'.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900