How to create sound from a double array and play it on the speaker

I have an array of doubles (over 60 thousand records in size), I have a frequency value. Now I want to create a sound from it using C / C ++, which I can play on the speaker. My OS is Linux.

Thank. I hope I'm clear enough.

+3
source share
4 answers

http://www.linuxjournal.com/article/6735

This is a link to an article in the Linux Journal about programming with ALSA (Advance Linux Sound Architecture). It contains sample code.

+2
source

beep, Debian. , .

ioctl() KIOCSOUND , . :

ioctl(fd, KIOCSOUND, CLOCK_TICK_RATE/(int)frequency);

frequency :

ioctl(fd, KIOCSOUND, 0);

. fd - /dev/console, frequency - , . CLOCK_TICK_RATE , , beep 1193180 (). , , , DOS, .

+2

Qt , , , :)

QAudioOutput, , .

+1

api SDL SFML.

+1

Source: https://habr.com/ru/post/1769636/


All Articles