I need to use the boolean operator &, but I can't seem to get it to work.
I want to store a set of true/false conditions in one variable using a bitpattern. However, it doesn't work at all.
For example, when mask=13, the following conditions should be true:
mask&1
mask&4
mask&8
While the following should be false:
mask&2
mask&16
mask&32
...
So I started to look at what the & and | operators return, and found this:
All they seem to do is cast the right-hand value to unsigned integer and return that.
For example, try the following scope:
x=i*2-1;
y=(5&(i*10))*.1;
This will graph the numbers 0 to 10 when 'anded' with 5. Yet you get a nice, ordered staircase, regardless of what left value is used. The same happens when you use variable instead of a constant.
If you reverse the order of operators, you get a constant value (5), however, negative constants are seen as unsigned integers (2^31 - constant).
The same happens to negative numbers (replace i*10 with -i*10). This is on Winamp3.
Even weirder behaviour in Winamp 2: for negative numbers behaviour seems to be somewhat random.
Can someone check this on other systems, I'm running W2K.
Boolean operators broken?
26 posts
Umm...maybe explain a bit more in depth what the operators should and shouldn't be doing, and what they are and aren't doing? Cos I have no idea what you're talking about; I doubt anyone else will either.
They convert the parameters to integers and then perform a bitwise & or |:
14 & 31:
14 = 8 + 4 + 2 = 01110
29 = 16 + 8 + 4 + 1 = 11101
ANDing the two gives:
01110
11101
-----
01100 = 8 + 4 = 12
For my purposes I managed to make my own test... I just needed to see if one bit was 1 or 0. So if I want to check the 4th bit (= 8):
bit 8 = bnot(below(var%16,8))
First, it mods by one power higher (16), effectively discarding all the higher bits, and then it checks if the number is larger than 8.
14 & 31:
14 = 8 + 4 + 2 = 01110
29 = 16 + 8 + 4 + 1 = 11101
ANDing the two gives:
01110
11101
-----
01100 = 8 + 4 = 12
For my purposes I managed to make my own test... I just needed to see if one bit was 1 or 0. So if I want to check the 4th bit (= 8):
bit 8 = bnot(below(var%16,8))
First, it mods by one power higher (16), effectively discarding all the higher bits, and then it checks if the number is larger than 8.
Yeah us MilkDrop people noticed this a bit ago.
We just the & operator for rounding.
0&3.2 = 3;
0&3.7 = 4;
as int just rounds down.
We don't use the pipe.
Doesn't do a bitwise boolean operation at all. 🙁 😕
Confused the hell out of teh MilkDrop clone authors (Roman - Xplugin, Brian - Twisted Pixel) 🙂😉
Anyway we just blamed it on Justin and the rest of the dodgy AVS coders as Ryan stole the code.😉😉
We just the & operator for rounding.
0&3.2 = 3;
0&3.7 = 4;
as int just rounds down.
We don't use the pipe.
Doesn't do a bitwise boolean operation at all. 🙁 😕
Confused the hell out of teh MilkDrop clone authors (Roman - Xplugin, Brian - Twisted Pixel) 🙂😉
Anyway we just blamed it on Justin and the rest of the dodgy AVS coders as Ryan stole the code.😉😉
*tsk* *tsk*
Stealing code that doesn't work. How pathetic. 😛
Does this happen in eveything? Just DM or SSC?
Stealing code that doesn't work. How pathetic. 😛
Does this happen in eveything? Just DM or SSC?
So if they ever fix it, all the milkdrop presets like that will be broken? 🙂
You can use var%(var+1) for a slower, but 'correct' rounding...
You can use var%(var+1) for a slower, but 'correct' rounding...
Yeap they sure will. 🙂
We have put up with far worse changes to MilkDrop and all the presest have to be changed (Went through thousands by hand 🙂 ) - All that dodgy code.
This change will be a simplist though - search and replace. Buut I don't see an update in teh near future. I have given up and am doing my own thing,
We have put up with far worse changes to MilkDrop and all the presest have to be changed (Went through thousands by hand 🙂 ) - All that dodgy code.
This change will be a simplist though - search and replace. Buut I don't see an update in teh near future. I have given up and am doing my own thing,
I'm fixing | and & for 2.92's AVS 🙂
Dont know, but 'I think' this is the first time since I came here, justin has replied 🙂
🙂
at least that indicates he might have actually thought about the new avs. 🙂
I tryed to use the and and or's but recognized that something else came out than expected so i totally skipped that. Now i know the fault was not caused by my OS.
hey, he isn't such an asshole after all 😁
one other question...will you be getting rid of that god awful window size snapping, or give it a checkbox somewhere...?
one other question...will you be getting rid of that god awful window size snapping, or give it a checkbox somewhere...?
WTF justin posting!?!?
That's like, woah. Maybe finally we'll see some proper updates.
That's like, woah. Maybe finally we'll see some proper updates.
Hopefully an update will come out soon. I wanna see some good stuff added.
AFAIK that window size snapping is a consequence of them introducing new 'general purpose windows' into Winamp2's skin and having AVS use that instead of its own window...
mmmm
can't....resist....
must....argghhhh
justin: DUDE! Don't revive age-old threads 🙄.
mmmm
can't....resist....
must....argghhhh
justin: DUDE! Don't revive age-old threads 🙄.
Lol! 11-27-2002 - > 05-27-2003
6 Months passed until an reply but there has been one 😁
6 Months passed until an reply but there has been one 😁
The next version of WA 2.x will feature this fix I understand
Winamp 2.92:
* startup with hung winamp process in background fixed
* CD ripping support in media library (with OGG Vorbis encoding support)
* Preliminary AAC playback support added to in_mp3.dll
* media library bugfixes and improvements (listener count in internet *, etc)
* ryan fixed shuffle again
* minibrowser ctrl+l fix.
* nsv: subtitle bugfixes, more buffering options, shoutcast metadata support,
better invalid bitstream handling, better display options, new ASYN aux
chunk handling.
* nsv: support for new extended TOC with frame-accurate seeking
* video: overlay fixes on 556 and other unusual modes, drag&drop URL
to video window now works. Subtitle fixes.
* cdda: bugfixes
* AVS evallib | and & operator fixes
* in_vorbis fixes
Sadly nothing about any new changes.🙁
Winamp 2.92:
* startup with hung winamp process in background fixed
* CD ripping support in media library (with OGG Vorbis encoding support)
* Preliminary AAC playback support added to in_mp3.dll
* media library bugfixes and improvements (listener count in internet *, etc)
* ryan fixed shuffle again
* minibrowser ctrl+l fix.
* nsv: subtitle bugfixes, more buffering options, shoutcast metadata support,
better invalid bitstream handling, better display options, new ASYN aux
chunk handling.
* nsv: support for new extended TOC with frame-accurate seeking
* video: overlay fixes on 556 and other unusual modes, drag&drop URL
to video window now works. Subtitle fixes.
* cdda: bugfixes
* AVS evallib | and & operator fixes
* in_vorbis fixes
Sadly nothing about any new changes.🙁
isnt that actually winamp 2.95 fixing it?
Well, there was a leak of 2.92 and that's when Rovastar posted. Then there was another leak, this time 2.95 with more bugfixes. Neither is official.
actually no need to answer rhetorical questions (unless it helps your stats or makes you feel important 😉). but you're right, posted it myself before and forgot it in meanwhile.
he ryan, how about subdir support. i know the request list is long, but with so many packs around this is rather essential 🙂
he ryan, how about subdir support. i know the request list is long, but with so many packs around this is rather essential 🙂
Or you switch to Hotlist / Playlister, which will manage Presets even from Subdirs. 😁
I know, controlers are not usefull if you are creating presets, but for viewing (even as a pure non VJ) its just perfect. Why asking for stuff you can have already?? 🙂
I know, controlers are not usefull if you are creating presets, but for viewing (even as a pure non VJ) its just perfect. Why asking for stuff you can have already?? 🙂
Don't revive threads...
Sorry Dude, was'nt able to post "in time" as i was forced to work far away from home and had vacation afterwards.
So what, shall i shut up because i had'nt the possibillity to write this earlier??
Either someone is interested in my opinion or not. If not, there's something like an ignore list i think :roll:
So what, shall i shut up because i had'nt the possibillity to write this earlier??
Either someone is interested in my opinion or not. If not, there's something like an ignore list i think :roll:
I wouldn't have minded if you hadn't replied to a bunch of old threads with nothing interesting.
What is interesting and what not always depends on the readers view.
But i don't want to argue now.
So just don't mind it please. None of the threads was not older than 10 days and i felt like add something to 'em, which is neither post pumping nor offensive.
So just keep the peace up and if there's nothing to add we can let this thread [Edit](and the others, so i won't multi-post)[/Edit] die, ok?
Guess you'll agree. 🙂
But i don't want to argue now.
So just don't mind it please. None of the threads was not older than 10 days and i felt like add something to 'em, which is neither post pumping nor offensive.
So just keep the peace up and if there's nothing to add we can let this thread [Edit](and the others, so i won't multi-post)[/Edit] die, ok?
Guess you'll agree. 🙂