chfin/cl-portmidi

open-input returns nil instead of stream pointer

Closed this issue · 1 comments

The conditional form in open-input seems incorrect:

(case err
(mem-ref stream-ptr 'midi-stream)
(error (get-error-text errnum))))))

When there is no error, it simply returns nil because there was no matching clause.

It should probably be the same as open-output:

(if err
(error (get-error-text errnum))
(mem-ref stream-ptr 'midi-stream)))))

chfin commented

Sorry for the late reply (I completely missed this) and thanks for the bug report. Should be fixed now.