Commit ed0ae06f authored by Stefan Doehla's avatar Stefan Doehla
Browse files

fixed tests - now using reverse type and latency

parent ee3e194c
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -331,7 +331,17 @@ void IVAS_RTP_LogPiData(
            case IVAS_PI_ISM_POSITION:
            case IVAS_PI_ISM_DISTANCE_ATTENUATION:
            case IVAS_PI_ISM_DIRECTIVITY:
            {
                fprintf( f_piDataOut, "{}" );
            }
            break;
            case IVAS_PI_PI_LATENCY:
            {
                fprintf( f_piDataOut, "\n\t\t\t\"reverseType\": \"%s\",", PiDataNames[cur->data.piLatency.type] );
                fprintf( f_piDataOut, "\n\t\t\t\"latency\": %d", cur->data.piLatency.latency );
                fprintf( f_piDataOut, "\n\t\t}" );
            }
            break;
            case IVAS_PI_R_ISM_ID:
            case IVAS_PI_R_ISM_GAIN:
            case IVAS_PI_R_ISM_DIRECTION:
@@ -558,7 +568,7 @@ void IVAS_RTP_WriteExtPiData(
            break;
            case IVAS_PI_PI_LATENCY:
            {
                fprintf( f_piDataOut, "%d", cur->data.piLatency.latency );
                fprintf( f_piDataOut, "%s,%d", PiDataNames[cur->data.piLatency.type], cur->data.piLatency.latency );
            }
            break;
            case IVAS_PI_R_ISM_ID:
+5 −3
Original line number Diff line number Diff line
@@ -650,9 +650,11 @@ def run_rtp_bitstream_tests(
                        ):
                            isEqualAD(AUDIO_DESCRIPTION(**d), r)
                    elif type(generatedPIData[ts][pitype]) == PI_LATENCY:
                        # Decoded JSON stores latency as integer
                        assert int(decodedPiData[ts][pitype]) == data.latency, \
                            f"PI_LATENCY mismatch: {decodedPiData[ts][pitype]} != {data.latency}"
                        entry = decodedPiData[ts][pitype]
                        assert entry["reverseType"] == data.reverseType, \
                            f"PI_LATENCY type mismatch: {entry['reverseType']} != {data.reverseType}"
                        assert int(entry["latency"]) == data.latency, \
                            f"PI_LATENCY latency mismatch: {entry['latency']} != {data.latency}"
                    else:
                        assert False, "Unsupported PI data found"