Updated capswitch sample for multi-platform