Skip to content

Conversation

hollowness-inside
Copy link

@hollowness-inside hollowness-inside commented Apr 23, 2024

Append to the output buffer directly. This eliminates the need to intermediately allocate additional memory to keep int16 and int32 as bytes.

@@ -134,6 +129,7 @@ func rescaleFrame(s Frame, bits int) int {
}

func fmtToBytes(wfmt WaveFmt) []byte {
<<<<<<< Updated upstream
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Committed by mistake?

@@ -144,14 +140,17 @@ func fmtToBytes(wfmt WaveFmt) []byte {
blockalign := int16ToBytes(wfmt.BlockAlign)
bitsPerSample := int16ToBytes(wfmt.BitsPerSample)

=======
b := make([]byte, 0, 23)
>>>>>>> Stashed changes
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants