SyntaxHighlighter

Friday 23 August 2013

Day 49: A sound call

The happenings @ Kilburn

I realised that the plan described yesterday (for managing sound) isn't the best solution, because in reality we want to do audio processing when either a. something comes into view after not being in the view and b. something goes out of the view after being visible in it. Otherwise no changes are made, any audio playing just keeps playing, and vice versa. The method yesterday, actually calls the audio processing script for a marker on any frame during which that marker is seen. It doesn't know if a marker that was in the view in the previous frame has since moved out (i.e. the b. case above).

So here's a better system:
            // Check if any model has just appeared or has just disappeared.
            for (int i = 0; i < MarkerNodes.Length; i++)
                if (MarkerNodes[i].Enabled && (
                        // Marker has just left the view
                        (WasFound[i] && !MarkerNodes[i].MarkerFound)
                        // Marker has just come into the view
                        || (!WasFound[i] && MarkerNodes[i].MarkerFound)))
                {
                    // If it's just come into view then enable sound, otherwise disable sound
                    processFoundModelAudio(i, MarkerNodes[i].MarkerFound); // second parameter specifies enable or disable
                    WasFound[i] = MarkerNodes[i].MarkerFound;   // update for next time
                }

And then we have the switch statements in the processFoundModelAudio method to determine exactly which model it is. Lovely! Continued coding this stuff into the AR demo.

Georgiana finished off the Pi's, all 278 of them today. Turned out we are short on 48 or so power supplies, we've seemingly lost track of a box or two! The rest of the Pi's are all packed and ready to go.

Also noted that we were horribly short on card readers, only had about 80 of them. So Steve decided since the school lab PC's will all come with card readers anyway, we won't give the students any card readers with their Pi's. Eventually I had to go over to the AIG lab and remove all the existing card readers from the bags... a gruelling display of manual labour indeed.

Also managed to lock myself out of my CS account. Again. Password wasn't working! Similar thing happened about a month ago when I was uploading pics for Rina and needed to use my CS credentials, noticed I couldn't log in. Whatever the problem was that time, Tony Curran walked me through resetting my password and all was well. He also mentioned (rightly so) that I really should have gone through the ARS system rather than just turn up at his door with an email from Rina as the only announcement (he really is a busy chap what with managing the IT of the whole building/school/whatever) - so this time I smugly submitted an ARS request... and then completely missed Tony who came looking for me when I was out for a late lunch! His office was locked afterwards so looks like this will have to wait till tomorrow.

Pi's lined up in battle formation. Katy doesn't stand a chance.


No comments:

Post a Comment

Note: only a member of this blog may post a comment.