Re: try/catch in scsynth

miguel.negrao-lists-/wLt9BB+Iy41Tgt60Rntydi2O/[email protected]
Newsgroups gmane.comp.audio.supercollider.devel
Message-ID <[email protected]>
Hi Nathan,

Novice here too, but I did hear the same about exceptions and real-time 
safety.

It looks though that the try/catch was written by James McCartney which 
I imagine knows what he was doing... ?

https://github.com/supercollider/supercollider/blob/66f84c8d57e3947df95e2b2eb72f248ef1cfb338/source/server/SC_CoreAudio.cpp#L927

grepping the plugins directory I don't find any throw statements there 
though...

Best,
Miguel

On 28-03-2018 21:32, nathan-PB1wun9k+p9Wk0Htik3J/[email protected] wrote:
> hi list,
> 
> while investigating 
> https://github.com/supercollider/supercollider/issues/3563, i found that 
> there are try/catch statements in the main audio callbacks for scsynth. 
> two examples:
> 
> https://github.com/supercollider/supercollider/blob/4146f83117433e4e413ab878951f4a981a98aed6/server/scsynth/SC_Jack.cpp#L447 
> 
> 
> https://github.com/supercollider/supercollider/blob/4146f83117433e4e413ab878951f4a981a98aed6/server/scsynth/SC_PortAudio.cpp#L181 
> 
> 
> and there are some throw statements in the SC guts:
> 
> https://github.com/supercollider/supercollider/blob/develop/common/SC_AllocPool.cpp#L391 
> 
> 
> i'm still a novice to real-time safety in programming, but i have heard 
> that C++ exceptions are not safe for real-time audio. should we be 
> concerned about this?
> 
> 
> nathan
> 
> _______________________________________________
> sc-dev mailing list
> 
> info (subscription, etc.): 
> http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx 
> 
> archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
> search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/


-- 
Miguel Negrão
http://www.friendlyvirus.org/miguelnegrao

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.