Well, after searching through some old posts here, I found that there were different ways to go about playing general sound effects in C. Can anyone help me figure out how to play sounds in my programs? I'm making them in C ( hence this sub form) and I'm on the windows 7 OS and using Dev C++ as my compiler.

I really didn't want to ask, but I searched around for past posts and with search engines, and I couldn't find an answer. This is something I've sadly never covered before ":/

I looked at code snippets, and the closest thing I could find compiled with fatal errors which I believe were due to non standard libraries.

Recommended Answers

All 5 Replies

Google ("c sound library") returns plenty of good results. You can find tutorials/documentation for any of them. Check out the features to find which library fits your needs best.

Thanks, I was googling "playing sound in c programing", no useful result.

Alright, my next question is how would I include these libraries in my program? Do I place them in the same directory of my application and compile them, or do I put something in the dev c libraries folder? I'm totally lost at this point, as I've never learned this sort of stuff. I've always coded my programs from standard libraries, and I've never tried to use someone elses.

I decided to stick with SDL (http://www.libsdl.org) if it matters.

This tutorial will tell you which directories to add. It is based on Code::Blocks but you should be able to find these options within Dev-C++ easily enough.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.