Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to play wav files in different frequency in C#.Net. please provide a sample code too..
Posted
Comments
Sergey Alexandrovich Kryukov 12-Oct-13 21:48pm    
Frequencies are already prescribed in the WAV file. So, what do you mean? You can shift all frequencies by changing the overall tempo. Is that what you need?
—SA
manuthebos 12-Oct-13 21:49pm    
i want shift the frequencies while playing ...

1 solution

This is not so simple, even if you just want to change the tempo of the whole WAV record. As far as I can see, .NET FCL does not provide a ready-to-use library for playing a record at arbitrary speed. You need to go to a lower level, with the Windows multimedia library. This CodeProject article will give you a good idea on what's involved: Playing .WAV files using the Windows Multi-Media Library[^].

If you want all that with .NET, you would need to wrap the Windows multimedia subsystem ("winmm.dll"). At least one such open-source wrapper is already created for you: http://winmm.codeplex.com/[^].

For detailed MSDN documentation, please see:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd743883%28v=vs.85%29.aspx[^],
http://msdn.microsoft.com/en-us/library/windows/desktop/dd743606%28v=vs.85%29.aspx[^].

All of the above is currently considered as "legacy API". You can also check out more up-to-date Microsoft API, but it only can be used in Windows 8 or Windows Server 2012:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd370802%28v=vs.85%29.aspx[^].

—SA
 
Share this answer
 

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