I'm using VLCKit in MacOS to play some audio streams and now I'm looking for a way to meter the audio. Is it possible to add the AudioBarGraph filter? This is what I'm trying in Swift:
Code: Select all
var outputPlayer: VLCMediaPlayer = VLCMediaPlayer()
let videoURL = URL(string: theURL)
let media = VLCMedia(url: videoURL!)
media.addOptions([AnyHashable("--audio-filter=audiobargraph_a") : NSNull()])
media.addOptions([AnyHashable("--audiobargraph_a-bargraph=1") : NSNull()])
media.addOptions([AnyHashable("--sub-source=audiobargraph_v") : NSNull()])
outputPlayer.media = media
outputPlayer.delegate = self
outputPlayer.drawable = self.OutputPlayerView
outputPlayer.play()
Thanks,
Streamin'