Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 1566 - Incorrect error message if Nyquist returns mono sound as an array
Incorrect error message if Nyquist returns mono sound as an array
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Nyquist
unspecified
Per OS All
: P4 Repeatable
Assigned To: Steve Daulton
: test_single_OS
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-23 14:32 UTC by Steve Daulton
Modified: 2018-08-20 11:45 UTC (History)
7 users (show)

See Also:
Steps To Reproduce:
In the Nyquist Prompt, run the code: (vector (hzosc 440)) This returns a mono sound (440 Hz sine wave) in an array.
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00
stevethefiddle: Regression+
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+
stevethefiddle: Test‑OK‑Lin+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Daulton 2016-12-23 14:32:38 UTC
When returning sound, a mono sound should be returned as a (mono) sound object and stereo sounds as an array of two sound objects. (More than 2 channels are not currently supported).

If Nyquist returns a mono sound as an array, it should throw an appropriate error:
"Nyquist returned one audio channel as an array.\n"

As of https://github.com/audacity/audacity/commit/67cec5ad8
Audacity incorrectly returns the error message:
"Nyquist returned too many audio channels.\n"

The error message as now is confusing and incorrect (only one channel is returned, which is not "too many").

This bug is due to incorrectly declaring mCurNumChannels as unsigned. It needs to be a signed integer because nyx_get_audio_num_channels may return a negative value. (It also causes multiple compiler warnings).

Assigned to myself.
Comment 2 Peter Sampson 2017-08-10 05:28:36 UTC
(In reply to James Crook from comment #1)
Testing on 10 06Aug nightly and macOS 10Aug nightly

on both platforms the "correct" message as specified by Steve in Comment #0 is displayed.

Looks to be fixed on thses platforms