win32--Music Media Processing

Source: Internet
Author: User

//Music Media processing#include <mmsystem.h>//Library support for Winmm.libpragma comment (lib,"Winmm.lib")//It could be a dynamic library, plus lib.//first, PlaySound can only put WAV files//1. ExamplePlaySound (_t ("national anthem. Wav"), NULL, Snd_filename | Snd_loop |snd_async);//2. PrototypesBoolwinapiplaysounda (_in_opt_ LPCSTR pszsound,//file name_in_opt_ hmodule Hmod,//Load Mode_in_ DWORD Fdwsound//Playback Mode);//3. Playback modeSnd_filename//The specified WAV file is loadedSnd_resource//Resource LoadingSnd_sync//The PlaySound function does not end after playing synchronouslySnd_async//asynchronous playback, after the call is complete, PlaySound immediately returns, non-cloggingSnd_loop//loop play, must be combined with asynchronous playback//Second, mcisendstring//MCI Series functions (Media Control Interface), you can play most of the music files, such as MP3//1. ExamplemciSendString (_t ("Open See_you_again.mp3 type MPEGVideo alias MyMusic"), NULL,0, NULL); mciSendString (_t ("Play MyMusic Repeat"), NULL,0, NULL); mciSendString (_t ("Close MyMusic"), NULL,0, NULL);//2. PrototypesWinmmapimcierrorwinapimcisendstringw (_in_ lpcwstr lpstrcommand,_out_writes_opt_ (uReturnLength) LPWSTR Lpstrreturnstring,_in_ UINT ureturnlength,_in_opt_ HWND hwndcallback);

win32--Music Media Processing

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.