OneLoneCoder / synth

The latest code to make your own virtual sound synthesizer in Windows. Please see the videos associated with this code. Links in the source files.
http://www.onelonecoder.com
361 stars 130 forks source link

Proper Linux support #11

Open Barracuda72 opened 4 years ago

Barracuda72 commented 4 years ago

Linux variant of NoiseMaker engine. No fancy user-friendly stuff like SDL full of bells and whistles, just good ol' ALSA. Made to be a drop-in implementation. Used this in another projects (such as NES emulator), works fine. Code quality is horrible, but, well, it gets the job done.

Also Linux-ported version of main4.cpp (NCurses + raw Linux input).

PQCraft commented 3 years ago

@Barracuda72 i compiled it using

g++ main4.cpp -o synth -lpthread -lasound -lcurses

it fails with this:

Found Output Device: default
Found Output Device: surround21
Found Output Device: surround40
Found Output Device: surround41
Found Output Device: surround50
Found Output Device: surround51
Found Output Device: surround71
Found Output Device: samplerate
Found Output Device: speexrate
Found Output Device: jack
Found Output Device: oss
Found Output Device: pulse
Found Output Device: upmix
Found Output Device: vdownmix
Found Output Device: hdmi:CARD=Generic,DEV=0
Found Output Device: dmix:CARD=Generic,DEV=3
Found Output Device: dsnoop:CARD=Generic,DEV=3
Found Output Device: hw:CARD=Generic,DEV=3
Found Output Device: plughw:CARD=Generic,DEV=3
Found Output Device: usbstream:CARD=Generic
Found Output Device: sysdefault:CARD=Generic_1
Found Output Device: front:CARD=Generic_1,DEV=0
Found Output Device: surround21:CARD=Generic_1,DEV=0
Found Output Device: surround40:CARD=Generic_1,DEV=0
Found Output Device: surround41:CARD=Generic_1,DEV=0
Found Output Device: surround50:CARD=Generic_1,DEV=0
Found Output Device: surround51:CARD=Generic_1,DEV=0
Found Output Device: surround71:CARD=Generic_1,DEV=0
Found Output Device: dmix:CARD=Generic_1,DEV=0
Found Output Device: dsnoop:CARD=Generic_1,DEV=0
Found Output Device: hw:CARD=Generic_1,DEV=0
Found Output Device: plughw:CARD=Generic_1,DEV=0
Found Output Device: usbstream:CARD=Generic_1
Found Output Device: sysdefault:CARD=Device
Found Output Device: front:CARD=Device,DEV=0
Found Output Device: surround21:CARD=Device,DEV=0
Found Output Device: surround40:CARD=Device,DEV=0
Found Output Device: surround41:CARD=Device,DEV=0
Found Output Device: surround50:CARD=Device,DEV=0Found Output Device: surround51:CARD=Device,DEV=0Found Output Device: surround71:CARD=Device,DEV=0Found OutputFUnable to register async handler
                                Segmentation fault (core dumped)