Skip to content

refactor send audio chunks metadata #20

@canefe

Description

@canefe

The wrapWithNpcHeader function is being called for every chunk inside the loop in sendAudioInChunks. This is inefficient as it sends the NPC UUID metadata with each chunk packet, increasing bandwidth usage unnecessarily.

The metadata (like the NPC UUID) should ideally be sent only once at the beginning of a chunked stream, either in a separate "start stream" packet or as part of the header of the very first chunk. The current implementation might also cause issues on the client side if it's not expecting to receive this header with every chunk.

Consider refactoring the chunking logic to wrap the entire payload with the NPC header before splitting it into chunks, or redesign the protocol to send metadata separately from the chunk data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions