Lazarus

Programming => Graphics and Multimedia => Audio and Video => Topic started by: Pe3s on October 27, 2021, 10:00:56 am

Title: dspack play and pause
Post by: Pe3s on October 27, 2021, 10:00:56 am
Hello, I wonder why this code does not work
Code: Pascal  [Select][+][-]
  1. if FilterGraph1.Play then
  2. FilterGraph1.pause
  3. else
  4. FilterGraph1.Play
  5.  

stops playback but does not resume
Title: Re: dspack play and pause
Post by: af0815 on October 27, 2021, 12:29:29 pm
It depends on the contex of the snippet. If is called eg. from a Button it works, if it called from eg. a timer or callback it stops the started Filtergraph1 always. So you see no 'resume', because after resume it is stopped again.
Title: Re: dspack play and pause
Post by: Pe3s on October 27, 2021, 09:15:44 pm
Thank you
TinyPortal © 2005-2018