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