Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C Language Audio Input/Output [closed]

I've already searched for ways to capture/play audio with C Language, but I haven't found anything useful. Is there such a way to do this, or I'll have to use another language like C++, C# or Java?

like image 251
Danilo Valente Avatar asked Sep 06 '25 23:09

Danilo Valente


2 Answers

PortAudio is perfectly usable from C.

PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O.

PortAudio provides a very simple API for recording and/or playing sound using a simple callback function or a blocking read/write interface. Example programs are included that play sine waves, process audio input (guitar fuzz), record and playback audio, list available audio devices, etc.

like image 69
bgporter Avatar answered Sep 10 '25 08:09

bgporter


I think there is no reason to capture - play audio with pure c if it will be used on pc. but its easy with c++ becouse it has ready libraries. or if you want to work with a framework you can try c# or java

like image 34
Mustafa Ekici Avatar answered Sep 10 '25 08:09

Mustafa Ekici