def patch_wave_header(body):
length = len(body)<EOL>padded = length + length % <NUM_LIT:2><EOL>total = WAVE_HEADER_LENGTH + padded<EOL>header = copy.copy(WAVE_HEADER)<EOL>header[<NUM_LIT:4>:<NUM_LIT:8>] = bytearray(struct.pack('<STR_LIT>', total))<EOL>header += bytearray(struct.pack('<STR_LIT>', length))<EOL>data = header + body<EOL>if length != padded:<EOL><INDENT>data = data + bytearray([<NUM_LIT:0>])<EOL><DEDENT>return data<EOL>
Patch header to the given wave body.

    :param body: the wave content body, it should be bytearray.