diff --git a/SoundLooper.hpp b/SoundLooper.hpp index d91fed8..8f9ef3a 100644 --- a/SoundLooper.hpp +++ b/SoundLooper.hpp @@ -75,17 +75,17 @@ class SoundLooper final : public QObject { } Q_INVOKABLE void start() { - if (not BASS_Init(-1, 48'000, BASS_DEVICE_DEFAULT, nullptr, nullptr)) + if (not BASS_Init(-1, 96'000, BASS_DEVICE_DEFAULT, nullptr, nullptr)) exit(-10); - if (not BASS_RecordInit(2)) + if (not BASS_RecordInit(0)) exit(-11); recording = BASS_RecordStart(96'000, 1, 0, nullptr, nullptr); if (not recording) exit(-12); - stream = BASS_StreamCreate(48'000, 2, 0, &streamRecordProc, this); + stream = BASS_StreamCreate(96'000, 1, 0, &streamRecordProc, this); if (not stream) exit(-13); diff --git a/main.cpp b/main.cpp index 5712f4f..2e366bb 100644 --- a/main.cpp +++ b/main.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -17,6 +18,16 @@ int main(int argc, char* argv[]) { QQmlApplicationEngine engine; const QUrl url("qrc:/qml/main.qml"); + std::cout << "+++++++ Input Devices:" << std::endl; + for (const auto&info: SoundLooper::getAllRecordingDevices()) { + std::cout << info.id << " | " << info.name << std::endl; + } + std::cout << "+++++++ Output Devices:" << std::endl; + for (const auto&info: SoundLooper::getAllOutputDevices()) { + std::cout << info.id << " | " << info.name << std::endl; + } + std::cout << std::flush; + SoundLooper looper; engine.rootContext()->setContextProperty("soundLooper", &looper); engine.load(url);