I am trying to do an audio visualisation for a stream. The audio has to play in the background and currently I am playing it with an AVPlayer but I cannot get the metering from it. How can I get the metering and make the visualisation? Any suggestions?
An AVPlayer is a controller object used to manage the playback and timing of a media asset. You can use an AVPlayer to play local and remote file-based media, such as QuickTime movies and MP3 audio files, as well as audiovisual media served using HTTP Live Streaming.
The steps given below are required to be followed in order to play videos using AVPlayer in Xamarin iOS. Step 1 Go To Xamarin Studio. Click New Solution—> select iOS—>select App--> choose Single View App. Afterwards, click Next. Step 2 In this step, configure your app. Give the App Name (Ex: sample) and Organization Identifier.
You use an AVPlayer to play media assets, which AVFoundation models using the AVAsset class. AVAsset only models the static aspects of the media, such as its duration or creation date, and on its own, is unsuitable for playback with an AVPlayer. To play an asset, you need to create an instance of its dynamic counterpart found in AVPlayerItem.
Alongside the visual content presented with AVKit or AVPlayerLayer, you can also present animated content synchronized with the player’s timing using AVSynchronizedLayer. Use the synchronized layer to confer the current player timing onto its layer subtree.
Here you have an example with waveforms: A cocoa audio player component which displays the waveform of the audio file
Here you have a LED bar gauge and another example how can be used: ATTabandHoldAudioRecord
Apple, also have SpeakHere example - the code includes a LevelView .. but this Apple sample code is anything but simple to implement ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With