Ofelia
Ofelia copied to clipboard
ofToString return a list of audio driver
ofToString function is returning a list of audio drivers, when openframeworks documentation say that it should "Convert a value to a string."
On OSX and Windows10, here is the results of conversion from 1 to 10:
Unkown API Alsa Pulse OSS Jack OSX Core Audio MS WASAPI MS ASIO MS DirectShow Unkown API
@60-hz I could confirm this behavior which is pretty weird. Thanks for reporting this. I will have a look into this issue soon. For converting values to a string, I think you can just use tostring()
which is a built-in Lua function.
@cuinjune thanks for the hint, I found tostring yes :) but for this issue, I thought that I could use toboolean() in a same way but it's not working unfortunately.
I believe toboolean()
belongs to external module that you need to require?
For converting numbers to boolean, you can just do num ~= 0
to make it return true
or false
.
For example,
[tgl]
|
ofelia f;
print(a ~= 0);
Oh yes thanks, that's so simple... I forgot that lua didn't used != but ~= instead, thanks!