add comment
This commit is contained in:
+3
-1
@@ -117,14 +117,16 @@ void audio_loop() {
|
|||||||
pkt[8] = buf_len; // 这 4 个字节的作用未知,调整没有效果
|
pkt[8] = buf_len; // 这 4 个字节的作用未知,调整没有效果
|
||||||
pkt[9] = buf_len; // audio buffer length 只有调整这个字节生效。
|
pkt[9] = buf_len; // audio buffer length 只有调整这个字节生效。
|
||||||
pkt[10] = packetCounter++;
|
pkt[10] = packetCounter++;
|
||||||
|
// SetStateData
|
||||||
pkt[11] = 0x10 | 0 << 6 | 1 << 7;
|
pkt[11] = 0x10 | 0 << 6 | 1 << 7;
|
||||||
pkt[12] = 63;
|
pkt[12] = 63;
|
||||||
state_set(pkt + 13,63);
|
state_set(pkt + 13,63);
|
||||||
// memcpy(pkt + 13, state_data, sizeof(state_data));
|
// Haptics Audio Data
|
||||||
pkt[76] = 0x12 | 0 << 6 | 1 << 7;
|
pkt[76] = 0x12 | 0 << 6 | 1 << 7;
|
||||||
pkt[77] = SAMPLE_SIZE;
|
pkt[77] = SAMPLE_SIZE;
|
||||||
memcpy(pkt + 78, haptic_buf, SAMPLE_SIZE);
|
memcpy(pkt + 78, haptic_buf, SAMPLE_SIZE);
|
||||||
#if !DISABLE_SPEAKER_PROC
|
#if !DISABLE_SPEAKER_PROC
|
||||||
|
// Speaker Audio Data
|
||||||
pkt[142] = (plug_headset ? 0x16 : 0x13) | 0 << 6 | 1 << 7; // Speaker: 0x13
|
pkt[142] = (plug_headset ? 0x16 : 0x13) | 0 << 6 | 1 << 7; // Speaker: 0x13
|
||||||
// L Headset Mono: 0x14
|
// L Headset Mono: 0x14
|
||||||
// L Headset R Speaker: 0x15
|
// L Headset R Speaker: 0x15
|
||||||
|
|||||||
Reference in New Issue
Block a user