| uint32_t *end = p + NUM_SAMPLES; | uint32_t *end = p + NUM_SAMPLES; | ||||
| if (block_left != nullptr && block_right != nullptr) { | if (block_left != nullptr && block_right != nullptr) { | ||||
| int16_t *l = (int16_t*)&block_left->data[offset]; | |||||
| int16_t *r = (int16_t*)&block_right->data[offset]; | |||||
| uint16_t *l = (uint16_t*)&block_left->data[offset]; | |||||
| uint16_t *r = (uint16_t*)&block_right->data[offset]; | |||||
| do { | do { | ||||
| *p++ = (uint32_t)(*l++) << 16 | (uint32_t)(*r++); | |||||
| *p++ = (uint32_t)(*l++) << 16 | (uint32_t)(*r++); | |||||
| *p++ = (uint32_t)(*l++) << 16 | (uint32_t)(*r++); | |||||
| *p++ = (uint32_t)(*l++) << 16 | (uint32_t)(*r++); | |||||
| *p++ = (((uint32_t)(*l++)) << 16) | (uint32_t)(*r++); | |||||
| *p++ = (((uint32_t)(*l++)) << 16) | (uint32_t)(*r++); | |||||
| *p++ = (((uint32_t)(*l++)) << 16) | (uint32_t)(*r++); | |||||
| *p++ = (((uint32_t)(*l++)) << 16) | (uint32_t)(*r++); | |||||
| } while (p < end); | } while (p < end); | ||||
| return; | return; | ||||
| } | } | ||||
| if (block_left != nullptr) { | if (block_left != nullptr) { | ||||
| int16_t *l = (int16_t*)&block_left->data[offset]; | |||||
| uint16_t *l = (uint16_t*)&block_left->data[offset]; | |||||
| do { | do { | ||||
| *p++ = (uint32_t)(*l++) << 16; | *p++ = (uint32_t)(*l++) << 16; | ||||
| *p++ = (uint32_t)(*l++) << 16; | *p++ = (uint32_t)(*l++) << 16; | ||||
| } | } | ||||
| if (block_right != nullptr) { | if (block_right != nullptr) { | ||||
| int16_t *r = (int16_t*)&block_right->data[offset]; | |||||
| uint16_t *r = (uint16_t*)&block_right->data[offset]; | |||||
| do { | do { | ||||
| *p++ =(uint32_t)(*r++); | *p++ =(uint32_t)(*r++); | ||||
| *p++ =(uint32_t)(*r++); | *p++ =(uint32_t)(*r++); |