inst/tests/soncompare.R

## utility function for running these tests
soncompare <<- function(x, comppath, seed = 719, basepath = "./") {
  set.seed(seed)
  outfile <- paste(tempfile(), ".wav", sep="")
  sonsave(x,outfile)
  curr <- readWave(outfile)
  unlink(outfile)
  comp <- readWave(paste(basepath, comppath, sep = ""))
  expect_equal(curr, comp)
}
statisfactions/playitbyr documentation built on Jan. 27, 2024, 1:33 p.m.