Make some internal things static, add logf line to sound.c