MultiMedia Soft forum

Please login or register.

Login with username, password and session length
Advanced search  


SMF - Just Installed!

Author Topic: insert a breakpoint to stop playlist  (Read 136 times)


  • Newbie
  • *
  • Posts: 27
    • View Profile
insert a breakpoint to stop playlist
« on: March 06, 2021, 04:35:31 PM »


When playing, I want to insert a breakpoint to automatically stop playing the song when the playlist index hits that point.
What I do now is insert a null pathname in the playlist to fire "EV_PLAYLIST_SOUND_LOAD_FAILED" and m_audioAPI.PlayListStop.
Do you have any better suggestions?

Thank you.


  • Administrator
  • Sr. Member
  • *****
  • Posts: 314
    • View Profile
    • MultiMedia Soft
Re: insert a breakpoint to stop playlist
« Reply #1 on: March 07, 2021, 08:32:38 PM »


not a very elegant approach but could be the unique available when dealing with third-party common playlist formats like m3u, pls and wpl.

If you should be using our PDJ format for your playlists, you could have a better option: as you may know, each <Item> tag added to the playlist may have a number of <CuePoint> sub-tags, each of them with a custom "name" attribute: you could add a <CuePoint> with its "name" attribute set to something readable (for example "breakpoint") like the one below:

<Item pathname="c:\mysounds\myfile.mp3" >
    <CuePoint name="breakpoint" PosMs="20000" />

When the CallbackForPlayersEvents delegate is invoked with parameter EV_CUE_POINT_REACHED, check if the name of the cue point is "breakpoint" and, in case of positivity, invoke the m_audioAPI.PlayListStop method.
You can find how to get the name of a cue point within the CallbackForPlayersEvents delegate inside the "CuePoints" sample project.

Hope this helps.

Kind Regards

Severino Delaurenti
MultiMedia Soft