Jump to content
antwar

Camane Nak Import Bunyi Dlm C?

Recommended Posts

ade sesape yg tahu camane nak import bunyi(sound) dalam code?

skang aku tgh develop client sever chatting system. So klo bole aku nak wat cam YM la bole BUZZ!!

so aku terpikir bole x dalam C ni import bunyi2 yg simple..

klo bole

i)header ape yg diperlukan?

ii)camane nak gune dalam code?

tunjuk ajar korang amat diperlukan

Share this post


Link to post
Share on other sites

kalo nak mainkan bunyi

#include <windows.h>

int main()
{
   PlaySound("c:\\laguko.wav", GetModuleHandle(0), SND_FILENAME);
}

pastikan ko link kan projek ko dengan winmm.lib dan pastikan juga ada fail c:\laguko.wav (bleh tukar ikut suka :D)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...