Created
November 24, 2016 10:33
-
-
Save bashkirtsevich/54c6494903ff4485fb31e942e820a426 to your computer and use it in GitHub Desktop.
Function to mix audio channels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure Mix(ADest: PByte; ASources: array of PByte; ASize, ALength: Integer); | |
var | |
i, j: Integer; | |
begin | |
for i := 0 to (ALength - 1) div ASize do | |
for j := 0 to Length(ASources) - 1 do | |
begin | |
Move(ASources[j]^, ADest^, ASize); | |
Inc(ADest, ASize); | |
Inc(ASources[j], ASize); | |
end; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment