Skip to content

Commit 2246143

Browse files
authored
Merge branch 'v2.6' into AlyxPanelURLChange
2 parents d6602e9 + cabe27e commit 2246143

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

+eui/SignalsTest.m

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,21 @@
196196

197197
InitializePsychSound
198198
d = PsychPortAudio('GetDevices');
199-
d = d([d.NrOutputChannels] == 2);
200-
[~,I] = min([d.LowOutputLatency]);
201-
obj.Hardware.audioDevices = d(I);
202-
obj.Hardware.audioDevices.DeviceName = 'default';
199+
200+
% Keep output devices
201+
d = d([d.NrOutputChannels] > 0);
202+
obj.Hardware.audioDevices = d([d.NrOutputChannels] > 0);
203+
204+
% Select the lowest latency stereo output as the default
205+
stereo = [d.NrOutputChannels] == 2;
206+
[~,I] = min([d(stereo).LowOutputLatency]);
207+
I = I + sum(~stereo(1:I));
208+
if isempty(I)
209+
warning('Rigbox:eui:SignalsTest:NoStereoOutput', ...
210+
'No stereo output audio devices detected; default unassigned')
211+
else
212+
obj.Hardware.audioDevices(I).DeviceName = 'default';
213+
end
203214
else
204215
obj.Hardware = rig;
205216
end

docs/scripts/release_notes_v260.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@
8080
% * |git.repoVersion| - Returns release tag of repository, if available
8181
% * |eui.AlyxPanel| - The database URL can now be set via a UI context menu
8282
% or by passing a URL to the constructor.
83+
% * |eui.SignalsTest| - Warning instead of error when no stereo output
84+
% device found
8385
%
8486
% *Tests*
8587
%

0 commit comments

Comments
 (0)