Se detiene el audio al apagar la pantalla del teléfono

I'm pretty sure it's because the application stops running; since there's no way to keep it running in the background, while it's locked. You could try setting a wake lock or modifying your settings.