Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Biophysics Labs
Firmware
Commits
9d462e88
Commit
9d462e88
authored
Sep 11, 2020
by
Your Name
Browse files
Merge branch 'master' of
https://gitlab.science.ru.nl/biophysics-labs/firmware
parents
79f69b8b
24a691fb
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
9d462e88
...
...
@@ -95,6 +95,18 @@ If you use ALSA/Portaudio using an external USB sound card or dongle, put these
defaults.pcm.card 1
defaults.ctl.card 1
To get rid of warnings when using Portaudio, edit /usr/share/alsa/alsa.conf and comment out some lines, e.g.:
#GW pcm.rear cards.pcm.rear
#GW pcm.center_lfe cards.pcm.center_lfe
#GW pcm.side cards.pcm.side
#GW pcm.hdmi cards.pcm.hdmi
#GW pcm.modem cards.pcm.modem
#GW pcm.phoneline cards.pcm.phoneline
To disable the raspberry's internal Broadcom 2835 audio interface, create a file /etc/modprobe.d/alsa-blacklist.conf with the line:
blacklist snd_bcm2835
```
...
...
init.d/rc.lsldert01
View file @
9d462e88
...
...
@@ -3,4 +3,4 @@
echo
"running rc.lsldert01"
run zmq_trigger_subscriber
--zmq-proxy
tcp://lsldert00.local:5557
--lsl-name
'Digital Triggers 01'
run lslhider
--event-dev
/dev/input/by-id/usb-SIGMACHIP_USB_Keyboard-event-kbd
run zmqaudio
#
run zmqaudio
lsldert/Makefile
View file @
9d462e88
...
...
@@ -27,6 +27,7 @@ msgqueue_pubsub: msgqueue_pubsub.cc
lsldert_proxy
:
lsldert_proxy.cc
lsldert_proxy
:
LDLIBS+=-lpthread
zmq_trigger_subscriber
:
zmq_trigger_subscriber.cc
zmqaudio
:
LDLIBS=-lzmq
zmqaudio
:
zmqaudio.cc zmqaudio.h
paex_sine
:
paex_sine.c
zmqaudio paex_sine
:
LDLIBS+=-lm -lportaudio
...
...
lsldert/errormsg.txt
0 → 100644
View file @
9d462e88
This diff is collapsed.
Click to expand it.
lsldert/zmqaudio
View file @
9d462e88
No preview for this file type
lsldert/zmqaudio.cc
View file @
9d462e88
...
...
@@ -83,7 +83,7 @@ zmq_audiobuffer::zmq_audiobuffer(std::uint32_t _fsamp, std::uint32_t _nsamp,
data
{
new
float
[
_nsamp
*
_nchan
]},
idata
{
0
},
frames_per_buffer
{
paFramesPerBufferUnspecified
},
playing
{
false
},
stream
{
nullptr
}
{
assert
(
sizeof
(
float
)
==
4
);
// need 32 bit IEEE 754 floats
frames_per_buffer
=
100
;
frames_per_buffer
=
64
;
}
zmq_audiobuffer
::~
zmq_audiobuffer
()
{
...
...
@@ -277,6 +277,7 @@ int zmq_recv_multi(zmq::socket_t &socket, zmq::message_t parts[], int nmax) {
}
int
rtpriority
(
int
n
)
{
return
0
;
int
sched_policy
=
SCHED_FIFO
;
struct
sched_param
sched
;
...
...
@@ -306,7 +307,7 @@ int main(void) {
zmq
::
socket_t
ssub
(
context
,
ZMQ_SUB
);
ssub
.
connect
(
"tcp://raspi6.local:5557"
);
//
ssub.connect("tcp://lsldert00.local:5557");
//ssub.connect("tcp://lsldert00.local:5557");
ssub
.
setsockopt
(
ZMQ_SUBSCRIBE
,
"A"
,
1
);
rtpriority
(
prio2
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment