Advertisement
Guest User

Untitled

a guest
May 8th, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.57 KB | None | 0 0
  1. let mutable currInput = ref (createMagicArray ())
  2.  
  3. let rec updateCurrentFrameInfo () =
  4.     async {
  5.         let line = file.ReadLine() // hope we are faster to read than to process frames with DSP
  6.         let mas = line.Split [|' '|]
  7.         let tmp = Array.init MagicSize <| fun i ->
  8.             { r = 0xFF &&& (int mas.[i + 3] >>> 16)
  9.               g = 0xFF &&& (int mas.[i + 3] >>> 8)
  10.               b = 0xFF &&& int mas.[i + 3] }
  11.  
  12.         // ??????????????? ref ???????????????
  13.         currInput := tmp // no explicit lock
  14.         do! updateCurrentFrameInfo()
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement