Skip to content

Commit

Permalink
Workaround limitation in Fedora
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Jan 24, 2025
1 parent 013f70f commit dfe1989
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/test-audio.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test_that("Audio can be converted to various formats", {
input_info <- av_media_info(wonderland)

# Convert mp3 to mkv (defaults to libvorbis audio)
expect_equal(av_audio_convert(wonderland, tmp_mkv, verbose = FALSE), tmp_mkv)
expect_equal(av_audio_convert(wonderland, tmp_mkv, verbose = FALSE, sample_rate = 24000), tmp_mkv)
expect_true(file.exists(tmp_mkv))
mkv_info <- av_media_info(tmp_mkv)
expect_equal(input_info$duration, mkv_info$duration, tolerance = 0.1)
Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/test-fft.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ test_that("Audio FFT", {
av_log_level(16) # muffle some warnings about ac3 vbr
for(ext in extensions){
filename <- paste0('wonderland.', ext)
av_audio_convert(wonderland, filename, verbose = FALSE)
# libopus on fedora does not do support input sample_rate 44100
av_audio_convert(wonderland, filename, verbose = FALSE, sample_rate = 48000)
data <- read_audio_fft(filename, window = hanning(2048))
expect_equal(dim(data)[1], 1024)
expect_equal(dim(data)[2], 2584, tol = 0.001)
expect_equal(dim(data)[2], 2813, tol = 0.001)
unlink(filename)
}
})
Expand Down

0 comments on commit dfe1989

Please sign in to comment.