To use the now playing service, applications should register with the service, and publish and subscribe to the relevant PPS objects.
The audio manager looks after audio routing to output devices (and from input devices), and attenuating or muting output according to configured audio type priorities. When your application opens a PCM stream, it should also get an audio manager handle so that the audio manager will know about the stream. You should specify the same audio stream type for the audio manager handle as for the PCM stream handle to ensure that audio manager routes, and attenuates or mutes the audio stream as specificied by your system's configuration.
To get a PCM stream handle and an audio manager handle, call audio_manager_snd_pcm_open(), then audio_manager_get_handle(); or audio_manager_snd_pcm_open_name().
The audio manager doesn't look after your application's media playback, however. If you open a PCM stream and get an audio manager handle for that stream but do not use the now playing service, when your application's audio is muted or attenuated (ducked), playback will continue. To ensure that the preferred behavior can be implemented, your application should:
For more information about PPS, see the QNX Persistent Publish/Subscribe Developer's Guide