Help with mixing tracks via code

Hello Everyone
I am a student, and my project involves creating a program that will aid in detecting poor hearing in children.
For that purpose, i need to integrate into the software i am writing a mechanism that can take 2 or more tracks, get parameters for each one, for example: db and speed, and create a new file with the mix.
I need a library that can do this, and is Open GPL or similar,

can anyone help by pointing me to the right direction?
i cannot ‘just use audacity UI’ - i need a solution “by code” so my program can use…

thanks a lot