var ary = [-1, -29, 64, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 105, 110, 103, 0, 0, 0, 15, 0, 0, 0, 14, 0, 0, 11, 44, 0, 10, 10, 10, 10, 10, 10, 10, 30, 30, 30, 30, 30, 30, 30, 50, 50, 50, 50, 50, 50, 50, 70, 70, 70, 70, 70, 70, 70, 90, 90, 90, 90, 90, 90, 90, 110, 110, 110, 110, 110, 110, 110, -126, -126, -126, -126, -126, -126, -126, -106, -106, -106, -106, -106, -106, -106, -106, -86, -86, -86, -86, -86, -86, -86, -66, -66, -66, -66, -66, -66, -66, -46, -46, -46, -46, -46, -46, -46, -26, -26, -26, -26, -26, -26, -26, -6, -6, -6, -6, -6, -6, -6, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 80, 76, 65, 77, 69, 51, 46, 57, 56, 114, 4, 55, 0, 0, 0, 0, 0, 0, 0, 0, 52, 8, 36, 4, 116, 45, 0, 1, -32, 0, 0, 11, 44, -1, 28, 72, -21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -29, 32, 100, 0, 4, 32, 3, 75, 47, -96, 0, 0, 0, 0, 3, 72, 1, 64, 0, 0, 3, 10, 20, 98, -80, 56, -128, 81, -85, 46, -6, -80, 126, 31, -85, -89, -14, -114, -1, -4, 31, 127, -49, -1, -1, -61, -1, -1, -1, -1, -108, 116, 31, -90, -102, -86, -86, -97, -65, -2, -116, 9, 37, -119, 0, 98, -120, -30, 96, -115, -14, 68, 118, 23, -12, 120, 14, 5, -21, 39, 73, -48, -96, -120, -122, -104, 106, 116, 97, 55, 68, 64, 121, 17, 65, 83, -128, 122, 74, 98, -14, -124, 16, -1, -29, 64, 100, 50, 28, 114, 11, 112, -59, -57, -68, 0, 0, 0, 3, 72, 1, -128, 0, 0, 119, 40, -101, -68, 54, 116, 36, -13, -111, 78, 95, 9, -15, 123, 92, 76, 119, -68, 121, 18, 62, 40, -128, 58, -20, -18, 3, 90, -75, 80, -32, -56, -96, 93, -85, -39, -29, -60, -42, -23, 9, 112, -43, 9, 82, -27, 90, -74, -84, 69, 98, 96, -69, -54, 103, -22, -97, 119, 126, -48, -10, 51, 124, 58, -55, 9, -123, -70, 42, -71, -53, 113, -69, -49, -15, -5, -5, -3, 95, -18, 54, -32, 61, 125, -106, -24, -81, 97, 62, -75, 24, 98, 68, -101, 16, -34, 90, -50, 112, -96, 81, -5, -8, -17, 34, 107, 20, -92, 123, -17, 48, -21, -9, -87, -15, 2, 106, -75, -62, -58, -21, 14, 37, -19, -120, 123, 112, 101, 121, 107, -18, -98, -5, -91, 53, 123, -18, -102, -8, -91, 47, 125, -1, -33, 62, -125, 22, 46, 46, -18, 60, 72, -76, -97, 51, -22, 53, -92, -45, -23, 127, -58, -91, -105, -55, -116, -29, -34, -15, 53, 60, -66, -127, 99, -51, -99, 34, -75, -86, -87, -89, 106, -74, 83, -120, 83, -13, -1, -29, 64, 100, 9, 22, -63, 109, 104, -58, -25, -80, 0, -128, 0, 3, 72, 1, -64, 0, 0, -68, 71, 67, 117, -52, 114, -111, -59, 121, 8, 46, 8, 74, 97, -48, -109, 12, -9, 40, -91, -32, 111, -113, -39, -93, -82, -48, 32, 80, -84, 37, -74, 61, -70, 92, 17, -93, 6, -62, 81, 108, 37, 29, 67, -45, 84, -126, 80, -14, -89, -46, 22, -50, 79, -49, 79, 77, -36, 90, 114, 99, 2, -29, -104, 83, 84, -80, -116, -27, 90, 119, -37, 118, 14, 77, 124, -113, 35, 93, 92, -85, 79, -97, 62, -46, 36, -67, 123, 91, -19, -108, 107, -38, -67, -29, -42, -65, 97, 91, 106, -3, 45, 93, -38, -42, -67, -51, 118, -46, -115, 78, -91, -6, 69, 21, 119, 91, 114, -8, -43, -83, -5, -51, -10, 111, 122, -21, -27, -23, 73, 102, -69, -115, -64, -53, 51, -35, 106, 94, 47, -41, 74, -53, -114, -10, 80, -92, 68, 87, 102, -80, 96, -87, 95, -53, -69, -111, 92, -74, 49, 109, -39, 80, -37, -67, -22, 82, 89, 111, 33, 86, 83, -67, -42, -72, -28, 105, -46, -93, 92, 23, 2, -56, -30, 48, 11, -82, -1, -29, 64, 100, 14, 23, 41, -13, 101, 42, 97, -125, -116, -128, 0, 3, 72, 0, 0, 0, 0, -97, 72, -6, -92, 1, -94, 69, -11, -50, -81, 86, -22, 81, 58, 107, 53, 110, -88, 99, 59, 92, -19, -85, 57, -105, 44, 2, -57, 110, -18, -68, 48, -24, 60, -17, -69, 64, 90, 13, 82, 44, 12, -112, -121, 48, 1, 31, 4, 48, -5, -111, -107, -53, -89, 44, 4, -90, 46, 80, -59, 43, 112, -35, 74, 8, -14, -103, 97, 91, -57, 20, 90, -122, 122, 115, 45, -13, 48, -78, 85, -86, -107, -89, -70, -77, 25, -118, -79, 78, 118, -4, 75, -40, -57, 89, -99, 110, 101, 46, -44, -23, -39, -5, -20, 93, -109, -71, 24, 52, 53, 40, -75, -42, -111, 103, -112, 85, 43, 28, 106, -68, 118, -78, -86, -50, 11, -98, -121, -26, 65, 72, -32, 83, -122, -41, 5, -80, 102, 5, 33, 62, 0, 41, 67, 59, -35, -22, 18, -97, -4, -52, -125, 114, -11, 37, 36, 85, -5, -19, 41, -88, 82, 42, -38, 81, 34, 90, 98, -71, -7, 105, -107, -88, 69, 85, -110, 37, 80, 77, -23, 26, -86, -83, -12, -29, 13, 11, -1, -29, 64, 100, 15, 23, -103, -73, 99, 122, 97, -125, -104, -128, 0, 3, 72, 0, 0, 0, 0, 14, 53, 66, 37, -64, -56, 50, 102, 84, -100, 11, 12, 5, 32, 96, -124, 69, -127, -45, -127, 53, 11, -56, -96, 8, 24, -93, 90, 109, 90, 67, 106, -77, -108, 13, -79, -71, 80, -13, 86, 107, 22, -101, -122, 75, -58, -71, 24, 45, 86, 70, 42, -128, -15, -59, -95, 28, 105, 57, 76, -71, -126, -70, 115, -24, -107, -106, -111, -99, -111, -114, 14, 73, -82, 111, 36, 105, 106, 3, -85, 97, 85, -111, 21, -82, -122, -78, 12, -70, -10, -40, 88, -66, -100, -50, -21, 81, -10, 126, 67, 33, 43, -119, -114, -84, -58, 84, -123, 6, 26, 15, 25, 2, 98, 69, 65, 32, 12, 28, 25, 80, 67, -125, 93, 13, 85, 100, 34, -44, -53, -123, 13, 28, 46, 121, 97, 23, -49, -72, 40, -52, -85, -114, 22, 102, -43, 90, 106, -60, -73, 40, 68, 30, 90, 95, -103, -18, 56, -34, 41, -49, 75, 0, 25, 104, 111, 79, -100, 111, -110, 51, 31, -25, 109, -73, 103, 103, -43, -75, -60, 92, -115, 58, 9, 68, 56, 13, -1, -29, 64, 100, 13, 23, -83, -9, 99, 119, 97, 35, -76, -128, 0, 3, 72, 0, 0, 0, 0, 67, -112, 105, -41, 120, 75, 53, 35, 66, 82, 28, -110, -28, -86, 85, 64, -120, -128, 83, -72, 8, 44, -125, -54, 44, -9, -88, 25, 115, -35, -59, 105, 85, 72, -77, 92, 76, 73, 58, 107, -88, 52, -67, -67, 102, -114, -45, 76, -121, 22, -5, 125, -117, 94, 100, 85, 97, -57, 101, -10, -100, 111, -39, -124, -106, -109, 27, 24, -10, 38, 37, 7, 92, -124, -92, 108, -104, -127, -72, -50, 10, -36, -121, 90, 124, -36, -86, -68, -107, 30, 78, -113, -54, 74, -59, -122, -86, 121, 58, -104, 93, 19, 114, -70, 82, -40, -97, -36, 21, 8, 65, -116, 112, -32, 32, -55, 16, -125, -8, 114, 61, -51, -110, 114, -79, 30, 109, -13, 104, -22, -113, 21, -80, 36, -82, 24, 59, -42, 38, 65, 34, 44, -108, 21, -49, 91, 46, 76, 26, 43, -111, -111, -120, -100, -114, 80, -116, -47, -6, -57, 114, 123, -110, -111, 109, -5, 38, 9, -124, -102, -79, 65, -99, -32, -37, -37, 74, -88, -122, 116, -83, -91, -76, -101, -108, 64, -80, -1, -29, 64, 100, 10, 21, -87, 111, 99, 119, 60, -61, -62, 0, 0, 3, 72, 0, 0, 0, 0, 9, -88, -61, 33, 97, -86, 6, -119, 12, 17, -94, -8, 27, 73, -31, -58, 9, -28, 122, 92, 124, 14, 4, -80, -117, -125, -31, -40, 106, -59, 3, 73, -82, -44, 66, 3, -83, 86, -56, 17, -46, -29, 58, 76, -33, 77, 11, 48, -22, 58, 76, 20, 87, 63, -107, 37, -8, -123, -75, 26, 81, 84, -24, -90, -45, -15, 13, -44, -6, 74, -76, -85, -34, -38, 104, -22, -105, -22, 107, 76, -127, 31, 40, 93, -59, -101, 74, 106, 62, 82, 5, -60, 26, -36, -30, 74, -74, -21, -127, 11, 45, -9, 71, 120, -7, 51, 29, 114, 18, -63, 44, 101, 116, 34, 95, 7, 41, 32, -95, 34, 86, -52, -42, 67, -103, 19, -50, -62, 38, -82, -61, 93, -84, 70, -27, 54, -127, 86, 18, -123, 31, 9, -109, 52, -106, -68, 84, -66, 118, -10, -114, 125, -26, -52, 26, -110, 57, 66, 15, 29, 34, 1, 98, -86, -90, 102, 103, -79, 19, 66, 84, -115, 105, 119, 23, -95, 95, 36, 121, 97, 42, -15, 65, 16, -75, 88, -126, -1, -29, 64, 100, 23, 24, 117, -47, 87, 119, 97, 35, -76, -128, 0, 3, 72, 0, 0, 0, 0, -17, 42, 25, 69, -111, 40, -86, 5, -122, 76, -64, -72, 11, -78, -19, 69, 16, 12, -24, 22, -119, -44, 65, -41, 78, 31, -121, 22, 5, 118, -87, -117, 50, 116, -101, 27, -119, 30, 118, 87, -46, -29, 116, 99, -113, -5, -43, 11, 94, 76, -87, -56, -116, -60, 26, 116, 51, 0, 50, -24, -28, 5, 69, 21, 12, 0, 39, -110, -114, -94, 68, -112, -88, -103, 88, -62, 38, -37, -14, 122, -75, -126, 98, 49, 17, -76, -36, -99, -95, 58, -101, -75, 56, -12, 83, -72, -100, 10, -88, 31, 82, 18, 41, 122, 33, -86, -54, 104, 28, 75, -32, -123, -126, 10, 66, 72, -87, -58, 37, 76, -94, -97, 85, 47, -74, 109, 80, -51, -69, 53, 19, -61, 110, -80, -89, -24, -107, 86, 102, -20, 109, 73, -113, 51, -16, -29, 9, 90, 86, 35, 10, 77, -121, -37, -31, 106, 72, 109, -122, 96, -62, -76, 98, -7, 120, 69, 73, -8, 72, -94, -124, -97, 53, -120, 69, -121, -19, 36, -44, -100, -114, 83, -120, -68, 92, 38, 102, -1, -29, 64, 100, 14, 23, 117, -109, 81, 119, 97, -125, -92, -128, 0, 3, 72, 0, 0, 0, 0, 37, 50, 44, 16, -106, 29, 50, 0, -77, 37, -126, -92, 18, 7, 13, 20, 105, -64, 81, -74, 37, -2, 22, 67, -80, -89, 41, 124, -14, 65, 10, -115, -70, 40, -5, -6, -34, -90, 11, 95, -121, 96, -104, 37, 104, -55, -38, -13, 62, -107, 59, 109, -126, 48, -79, 37, -11, 62, 20, -111, 105, 117, 97, -16, -87, -111, 106, -42, -55, 10, 107, 114, -29, -50, -88, 51, 44, 21, -44, -19, 89, 62, 91, -123, -15, 44, -85, -54, 79, -96, 96, -116, 62, -124, -62, 98, 56, 17, -26, -63, 65, 90, 40, -112, 56, 34, 2, -126, -128, -38, 98, 4, -104, -31, -96, 16, 107, 16, -127, -86, 49, -122, 11, -87, 22, 110, 112, 75, -13, -40, -73, -23, -82, -58, 96, -32, -6, -99, -124, -64, -42, -86, -7, 25, -6, -97, -74, 43, 126, -87, -116, 96, -111, 81, 108, 110, 71, -24, -93, -98, 17, -123, 117, -35, 26, -99, -10, -73, -93, -127, 20, 63, 31, -46, -45, 95, -93, 72, -80, -92, -28, 52, -3, 35, -45, 117, 6, -1, -29, 64, 100, 13, 23, 105, -45, 75, 39, 97, -125, -104, -128, 0, 3, 72, 0, 0, 0, 0, 45, 0, 8, -106, -84, -24, -106, 35, 2, -100, -108, 0, 26, -58, 104, 93, 23, 17, -96, -89, 58, 2, 87, 98, -85, 48, 10, 102, 112, -104, -56, 19, -118, -58, -18, -78, 2, -27, 60, 74, 94, -76, -95, -57, -47, -74, 103, 41, -48, -102, 6, 4, -112, 116, -70, -72, 15, -121, -43, 66, 30, 9, 8, -101, 38, 15, -91, 4, 107, 76, -106, 27, -104, -97, 56, 124, 83, -115, 49, 0, -100, 105, 92, 61, 72, 126, -107, -6, 50, -37, 103, 43, 87, 46, 58, -102, -42, -114, -21, 81, -83, -42, -81, -105, -10, 97, 70, -124, 21, 118, -56, -55, -109, 7, -121, 70, 8, 27, 71, 119, 59, 3, 68, -122, 104, 75, 99, 70, 11, 9, 12, -113, -127, -121, 124, 45, 104, -106, -100, 119, 34, 74, -87, -79, -68, -119, -94, -95, 40, 85, 34, -50, -84, 126, 70, 41, -16, -45, -17, -39, -2, 116, -7, 40, -66, -31, -108, -82, 59, -101, -26, 8, 123, 105, 42, -115, -73, 35, 68, 117, -85, 126, 121, 56, -121, 25, 68, -1, -29, 64, 100, 12, 22, -63, 41, 71, 38, -89, -68, 0, -128, 0, 3, 72, 1, 64, 0, 0, 76, 0, 125, 6, -84, 33, 97, 122, 26, -112, 31, 96, 48, -96, -47, 4, -20, 96, -94, 85, 100, 101, 12, 51, 72, 83, 12, 20, 72, 121, 19, -91, 3, -15, -60, 36, -62, 108, -106, 28, -124, 20, 112, -113, -109, -56, 93, -74, 83, 40, -110, 46, 45, 102, 42, 34, -90, 105, -100, 117, 54, 69, 58, 25, -104, 77, -18, -99, 123, 102, 40, 119, -123, 13, 115, 17, -107, 76, -76, -29, 18, 69, 100, 25, 32, -30, 31, 127, -36, -93, 97, -70, 62, 32, -64, -123, -116, 91, -17, 80, -93, 110, 21, -9, 27, 16, 123, -17, -71, 117, -117, -1, -69, 91, 55, -45, -85, 68, -60, 9, -9, -83, -3, -38, -70, -57, -33, -57, -5, -106, -64, -25, 39, -64, -97, -123, 77, 93, 86, -98, 11, -4, -104, -21, -5, 70, -67, -27, -51, -37, -85, 94, 23, -127, 26, 33, -17, 127, -1, -3, -39, -76, 119, -18, 113, -33, -92, -13, 95, 92, -112, -79, -79, -105, -124, -31, -4, 9, -9, 37, -126, 2, 30, -126, 76, -125, 39, -1, -29, 64, 100, 17, 24, 5, 123, 66, 0, -57, -68, 0, 0, 0, 3, 72, 1, -128, 0, 0, -29, 121, 4, -100, 85, -95, 81, 79, -62, 124, 75, -117, -46, 20, -74, -66, 113, 24, 74, 3, 116, -90, 28, 77, 80, 16, -90, 37, -126, 72, -62, 55, 73, -71, 110, 69, 31, -116, -59, -20, -32, 76, 81, -56, -11, 89, 52, 20, -121, -96, -22, 92, 25, 50, -103, 71, 18, 4, -3, 86, -69, 71, 53, -76, 41, 85, 74, 54, 84, 116, 20, 124, -81, -98, 33, 46, -107, -38, -38, -19, 85, -31, -67, -106, -112, -31, 55, -67, -119, -32, 111, -67, -102, -16, -4, 86, -51, 66, 125, -67, 85, -19, 103, -42, 41, 93, -45, 126, -112, -95, 125, 83, -1, -21, -103, 113, 95, 125, 127, 120, 95, 63, 58, -7, -6, -5, -82, -2, -85, -115, -25, 52, -1, -1, -13, 76, 95, 117, -109, -30, -1, -4, 90, 101, -112, 11, 66, 102, 5, -61, 40, -92, -96, 68, 105, -63, 103, 23, 18, 78, 41, -105, 53, 64, -32, 65, 33, -57, -42, -122, 45, 104, -34, -51, 117, 85, 106, -17, -43, 6, -86, -44, -60, 24, 66, -128, 34, -1, -29, 64, 100, 11, 22, -39, 79, 46, -54, -25, -80, 0, 0, 0, 3, 72, 1, -64, 0, 0, 0, 40, 1, 80, 7, 64, -86, 5, 48, 54, 64, -54, 18, 16, -63, 33, 38, -119, 109, 22, -47, 9, 19, 98, -28, -94, 87, 62, -76, 20, -22, 27, 113, 4, 8, -127, -46, 106, 16, -28, 0, -64, 4, 89, 43, 2, 64, 4, 1, -128, -16, -116, 100, -72, -28, -110, 32, -125, 80, 106, 77, 61, -93, 71, 36, -111, 4, 26, -119, 34, 72, -110, 36, -120, 34, 80, -108, 78, 50, 62, 93, 107, 101, 106, -54, -43, -85, 86, -83, 90, -71, -21, 46, 92, -71, 114, -26, -85, 90, -10, 90, -53, -83, 94, -53, 76, -43, -107, -74, -75, -83, 107, 89, 115, -35, 54, -7, -102, -12, -52, -52, -42, -75, -83, 109, -13, 51, 59, 90, -4, -52, -52, -27, -83, 90, -52, -52, -38, -42, -101, 52, -71, 112, 52, 13, 75, 3, 64, -46, -50, -4, -85, -108, 13, 30, -60, -96, -88, 104, -80, 51, -63, 90, -127, -89, -60, -89, 98, 47, -30, 32, 105, 76, 65, 77, 69, 51, 46, 57, 56, 46, 52, 85, 85, 85, 85, 85, -1, -29, 16, 100, 15, 0, 0, 1, -92, 0, 0, 0, 0, 0, 0, 3, 72, 0, 0, 0, 0, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85];

var sdPath=files.getSdcardPath()
var musicPath=files.join(sdPath,'脚本/声.mp3')
files.writeBytes(musicPath, ary);
sleep(100);
setInterval(() => {}, 100);
var path = musicPath;
var soundPool = new android.media.SoundPool(10, 1, 0);
var sound = soundPool.load(path, 1);
events.on('exit', function() {
    soundPool.release();
});

function SensorFun() {
    var ary = new Array;
    for (var i = 0; i < arguments.length; i++) {
        if (typeof arguments[i] == 'number') {
            ary.push(arguments[i]);
        };
    };
    if (weiyi(ary) >= 2) {
        soundPool.play(sound, 1, 1, 0, 0, 1);
    };
};
var sensor = sensors.register('gyroscope', sensors.delay.ui);
if (sensor) {
    sensor.on('change', SensorFun);
} else {
    toastLog('不支持此传感器');
    exit();
};

function weiyi(ary) {
    var sum = 0;
    for (var i = 0; i < ary.length; i++) {
        sum += Math.pow(ary[i], 2);
    };
    return Math.sqrt(sum);
};
