thestk / rtaudio

A set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound, ASIO, and WASAPI) operating systems.
Other
1.49k stars 318 forks source link

Separate backend in different headers #383

Closed lp35 closed 1 year ago

lp35 commented 1 year ago

Hi,

I know that rtaudio is a single hpp/cpp library but still. Today, we have CMake as build system for c/c++, and it is widely used.

While digging to find a bug in RTAudio, I've found very difficult to navigate/search into the code. My suggestion is to separate each backend in their own hpp/cpp.

rtaudio.hpp
rtaudio.cpp

backend/rtjack.hpp
backend/rtjack.cpp

backend/rtalsa.hpp
backend/rtalsa.cpp

This will lead to better separation of the code, easier tracing of backend modification throught git (as you can select history by file), and make the life of contributors easier.

I can make a PR for this.

Thanks!

garyscavone commented 1 year ago

Sorry, but I'm not interested in this. I greatly prefer having everything confined to two files.