summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2025-01-05 21:11:32 +0100
committerRoland Reichwein <mail@reichwein.it>2025-01-05 21:11:32 +0100
commit88ab4cec9636a3e7b43906e5e7d0f67ac77eb2d6 (patch)
treeb35f96ce516f2ccdefaceb7ad118a82295cf3d02
parent8295ee7ed24c82eceff15eddc57caa9ab5eda969 (diff)
Use snd_pcm_start() in compatible way (PC + PI)
-rw-r--r--PCM.cpp3
-rw-r--r--README.md14
2 files changed, 16 insertions, 1 deletions
diff --git a/PCM.cpp b/PCM.cpp
index 5e90b97..4388974 100644
--- a/PCM.cpp
+++ b/PCM.cpp
@@ -40,7 +40,8 @@ PCM::PCM(Config& config):
if (0 > snd_pcm_start(handle))
{
- throw std::runtime_error("PCM could not be started");
+ // On raspberry, this results in error. However, seems to generally work without
+ log_cout << "PCM could not be started" << std::endl;
}
if (npfd != 1) {
diff --git a/README.md b/README.md
index 5e91c1f..fa36934 100644
--- a/README.md
+++ b/README.md
@@ -19,6 +19,17 @@ Features:
- set/detected tempo (from clock/click)
- detected notes
+MIDI:
+$ aseqdump -l
+ Port Client name Port name
+ 0:0 System Timer
+ 0:1 System Announce
+ 14:0 Midi Through Midi Through Port-0
+ 24:0 M2 M2 MIDI 1
+
+=> M2 on 24:0 => client 24, port 0
+
+PCM:
Configure device:
Find your card with:
@@ -27,6 +38,9 @@ $ cat /proc/asound/cards
To get valid ALSA card names, use aplay:
$ aplay -l
+...
+default:CARD=Headphones
+...
and then create /etc/asound.conf with following: