fixed logic errors. Audio subsystem working. Need to run tests to ensure proper operation.