Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have some mp3 collection and i want to able play it on CD/DVD
i write audio player using c#
but i dont know how to protect my audio file
is there any way to encrypt audio files ??
what is best way to do it to protect this audio file from illegal use?

What I have tried:

i play sound using SoundPlayer class in System.Media namespace
but i need to way to protect files
Posted
Updated 16-Jul-18 19:00pm

1 solution

You don't have a simple method to do that. In order to use the built in player, the data has to be unencrypted.

Now, that's not to say it's impossible. You just have to write an audio filter driver[^] (in C) that decrypts the stream on-the-fly. The filter driver would sit in the filter graph used to play the stream.

Oh, and you also have to write code to encrypt the stream into a file.

This is FAR from a trivial task and samples are hard to come by.
 
Share this answer
 
Comments
Nelek 17-Jul-18 1:26am    
Agree with Dave:
Let's say it in other words... if the industry didn't came with that yet to avoid piracy... it is something quite ambitious for a single man
AminMhmdi 27-Jul-18 16:31pm    
@dave your solution is expensive, i write Device driver using WDK before but filter drive is not economic!!!
Dave Kreskowiak 27-Jul-18 16:53pm    
And it's the ONLY way you have of solving this little problem.

Have fun!

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