fix tests
This commit is contained in:
parent
79ceac0282
commit
c2dd137a1b
4 changed files with 15 additions and 16 deletions
2
.github/workflows/Tests.yml
vendored
2
.github/workflows/Tests.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
version:
|
||||
- '1.3'
|
||||
- '1.6'
|
||||
- '1'
|
||||
- 'nightly'
|
||||
os:
|
||||
|
|
|
@ -11,7 +11,7 @@ SampledSignals = "bd7594eb-a658-542f-9e75-4c4d8908c167"
|
|||
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
|
||||
|
||||
[compat]
|
||||
julia = "1.3"
|
||||
julia = "1.6"
|
||||
alsa_plugins_jll = "1.2.2"
|
||||
libportaudio_jll = "19.6.0"
|
||||
SampledSignals = "2.1.1"
|
||||
|
|
|
@ -133,7 +133,7 @@ function __init__()
|
|||
config_folder = "ALSA_CONFIG_DIR"
|
||||
if config_folder ∉ keys(ENV)
|
||||
ENV[config_folder] =
|
||||
seek_alsa_conf(["/usr/share/alsa", "/usr/local/share/alsa", "/etc/alsa"])
|
||||
seek_alsa_conf(("/usr/share/alsa", "/usr/local/share/alsa", "/etc/alsa"))
|
||||
end
|
||||
# the plugin folder will contain plugins for, critically, PulseAudio
|
||||
plugin_folder = "ALSA_PLUGIN_DIR"
|
||||
|
@ -604,10 +604,9 @@ function combine_default_sample_rates(
|
|||
)
|
||||
if input_sample_rate != output_sample_rate
|
||||
throw(
|
||||
ArgumentError(
|
||||
"""
|
||||
Default sample rate $input_sample_rate for input $(name(input_device)) disagrees with
|
||||
default sample rate $output_sample_rate for output $(name(output_device)).
|
||||
ArgumentError("""
|
||||
Default sample rate $input_sample_rate for input \"$(name(input_device))\" disagrees with
|
||||
default sample rate $output_sample_rate for output \"$(name(output_device))\".
|
||||
Please specify a sample rate.
|
||||
""",
|
||||
),
|
||||
|
|
|
@ -134,11 +134,11 @@ if !isempty(devices())
|
|||
source = stream.source
|
||||
@test sprint(show, stream) == """
|
||||
PortAudioStream{Float32}
|
||||
Samplerate: 44100.0Hz
|
||||
2 channel sink: $(repr(input_name))
|
||||
2 channel source: $(repr(output_name))"""
|
||||
@test sprint(show, source) == "2 channel source: $(repr(output_name))"
|
||||
@test sprint(show, sink) == "2 channel sink: $(repr(input_name))"
|
||||
Samplerate: 44100Hz
|
||||
2 channel sink: $(repr(output_name))
|
||||
2 channel source: $(repr(input_name))"""
|
||||
@test sprint(show, source) == "2 channel source: $(repr(input_name))"
|
||||
@test sprint(show, sink) == "2 channel sink: $(repr(output_name))"
|
||||
write(stream, stream, 5s)
|
||||
@test PaErrorCode(handle_status(Pa_StopStream(stream.pointer_to))) == paNoError
|
||||
@test isopen(stream)
|
||||
|
@ -209,8 +209,8 @@ if !isempty(devices())
|
|||
big = typemax(Int)
|
||||
@test_throws DomainError(
|
||||
typemax(Int),
|
||||
"$big exceeds maximum input channels for $output_name",
|
||||
) PortAudioStream(input_name, output_name, big, 0)
|
||||
"$big exceeds maximum output channels for $output_name",
|
||||
) PortAudioStream(input_name, output_name, 0, big)
|
||||
@test_throws ArgumentError("Input or output must have at least 1 channel") PortAudioStream(
|
||||
input_name,
|
||||
output_name,
|
||||
|
@ -219,8 +219,8 @@ if !isempty(devices())
|
|||
adjust_channels = true,
|
||||
)
|
||||
@test_throws ArgumentError("""
|
||||
Default sample rate 0 for input $output_name disagrees with
|
||||
default sample rate 1 for output $input_name.
|
||||
Default sample rate 0 for input \"$input_name\" disagrees with
|
||||
default sample rate 1 for output \"$output_name\".
|
||||
Please specify a sample rate.
|
||||
""") combine_default_sample_rates(
|
||||
get_device(input_name),
|
||||
|
|
Loading…
Reference in a new issue