R/play_vlc.R

Defines functions play_vlc

Documented in play_vlc

#' Use VLC to play sound
#'
#' Uses VLC player if available
#' @param fname filename of a .wav sound file
#' @export
play_vlc <- function(fname) {
  system(
    paste0(
      "vlc -Idummy --no-loop --no-repeat --playlist"
      , "-autostart --no-media-library --play-and-exit"
      , fname
      )
    , ignore.stdout = TRUE
    , ignore.stderr = TRUE
    , wait = FALSE
    )
  invisible(NULL)
}
mike-decarlo/geekr documentation built on Oct. 4, 2023, 6:45 a.m.