scripts/hook_durian.js
/*
    Play Sound Sequence but with custom params.

      * Parameter format as follows: valid sound sequences are 4-byte dwords
      [0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00]: play sound 1 once
      [0x01, 0x04, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00]: play sound 1 4x
      [0x02, 0x01, 0x23, 0x00] -> 1st byte is sound (0-7), 2nd byte is repetitions, 3rd byte is length, 4th byte is pause to next sound

    */
Play Sound Sequence but with custom params.
Play Sound Sequence but with custom params .
playSound() {
        var self = this;
        var params = self.allocNSData([0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);  
        var task = self.createTaskByNameWithArg('startSoundSequenceTaskWithSequence:', params);
        self.runTask(task);
    }
playSound ( ) { var self = this ; var params = self . allocNSData ( [ 0x00 , 0x01 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ] ) ; var task = self . createTaskByNameWithArg ( 'startSoundSequenceTaskWithSequence:' , params ) ; self . runTask ( task ) ; }
Play Sound Sequence but with custom params.
Play Sound Sequence but with custom params .
// create sound sequence // parameter format as follows: valid sound sequences are 4-byte dwords, 0x104 and 0x205 for the default sound sequence //var params = self.allocNSData([0x04, 0x01, 0x00, 0x00, 0x05, 0x02, 0x00, 0x00]);  // original // 2x short round of beeps // last task parameter is payload appended to the opcode