Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void hvl_GenWhiteNoise( int8 *buf, uint32 len )
- {
- uint32 ays;
- ays = 0x41595321;
- do {
- uint16 ax, bx;
- int8 s;
- s = ays;
- if( ays & 0x100 )
- {
- s = 0x7f;
- if( ays & 0x8000 )
- s = 0x80;
- }
- *buf++ = s;
- len--;
- ays = (ays >> 5) | (ays << 27);
- ays = (ays & 0xffffff00) | ((ays & 0xff) ^ 0x9a);
- bx = ays;
- ays = (ays << 2) | (ays >> 30);
- ax = ays;
- bx += ax;
- ax ^= bx;
- ays = (ays & 0xffff0000) | ax;
- ays = (ays >> 3) | (ays << 29);
- } while( len );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement