How to stop automatically after playing the specified position?

Started by Terry, March 03, 2021, 04:39:09 PM

Previous topic - Next topic

Terry

Hello,

I create a playlist using the PlayListCreate method and add some audio files.
The "PlayListExecAt" executes the playlist from the specified position until the playback is complete.
How to stop automatically after playing the specified position?

Best regards
Terry

Administrator

Hello Terry,

the purpose of a playlist is to play all contained songs in sequence without the user's intervention so using a playlist in the way you request is not covered by playlist's management of our components.
A possible solution could be to extract a specific song's pathname from that position inside the playlist and load that sound into another player using the LoadSound method.
For the purpose of obtaining the full pathname of a song stored inside the playlist at a certain position, you could use the PlayListGetItemString method with the "nString" parameter set to "PL_STRING_URL".

Hope this helps

Kind Regards

Severino Delaurenti
MultiMedia Soft