How to trim an AVAssetMBS?

I’m loading audio from a movie, and so I know how to get the AVAssetMBS from the movie.

What I haven’t figured out is how to make a copy of a small section of the AVAssetMBS for creating waveforms from that section, and playing that section of audio.

Can anyone tell me where to look for info on how to do this?

Well, you could of course use AVAudioPlayerMBS to play audio (or AVAudioPlayerNodeMBS). There you can load a video file, pick a start position and play. You check with a timer if end time is reached and stop it.

For making an audio file, you could use AVMutableCompositionMBS to append parts of assets. Then use AVAssetExportSessionMBS to write it to a file.

Our sample projects may help on this.

Supposing that you don’t want to do the editing right within your app, if you can save the audio as a file, perhaps you can edit and extract the parts that are of interest with a software such as Audacity? Available for Windows, MacOS and Linux, free. I did a project with that tool long ago.