Please check whether your application uses PulseAudio as an audio backend. If it outputs error like "device already in use" most probably it uses ALSA under the hood that does not support simultaneous usage of the audio devices by different applications.
On the other hand, libao might be compiled without support of the PulseAudio API - then you have to recompile it by yourself with PulseAudio API support or switch to another audio library.
https://www.xiph.org/ao/doc/ao_driver_id.html
https://www.xiph.org/ao/doc/drivers.html
https://www.xiph.org/ao/doc/ao_open_live.html
On the other hand, libao might be compiled without support of the PulseAudio API - then you have to recompile it by yourself with PulseAudio API support or switch to another audio library.
https://www.xiph.org/ao/doc/ao_driver_id.html
https://www.xiph.org/ao/doc/drivers.html
https://www.xiph.org/ao/doc/ao_open_live.html