This is a code snippet that you can insert into a Lua script that will get all of the sources in the current scene. I dug this out from looking at several scripts and piecing together from them. I'm posting so that now you have a single spot to get the working code.