Re: Framework, my new set of tools for audiogame creation in python3
@89
If this is anything like BGT sound pool, then post 88 should be correct. Consider this:
def do_something(n=None):
if n is not None:
return n * 2
return 1
If you call do_something without an integer, it returns 1. That one is the proverbial slot. Calling the function again and passing in that slot will cause you to get the powers of two, I.e, 2, 4, 8, 16, etc. So, when the sound pool "returns a slot", it's a fancy way of saying that the function returns a value which you could use later in some other function call.
To hopefully clear it up, consider this:
x = do_something()
print(x) #1
x = do_something(x)
print(x) #2
x = do_something(x)
print(x) #4
The code above reuses the function values, the slots, if you will, to obtain a different result. This is not what the sound pool does (you only need slots for updating sound ranges if memory serves), but the gist remains the same.
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector