open NAudio.MediaFoundation
open NAudio.Wasapi
open NAudio.Wave
open System.Threading
let url = "https://ice1.somafm.com/groovesalad-128-aac"
printfn "Starting Groove Salad Playback"
let start () =
use mf = new MediaFoundationReader(url)
use wo = new WasapiOut()
wo.Init(mf)
wo.Play()
while true do
Thread.Sleep 1000
start()
Hello,
I made an F# version of the code in https://github.com/naudio/NAudio/blob/master/Docs/PlayAudioFromUrl.md so I can easily listen to a certain radio-station on commandline. It might be of interest for documentation purposes: