I'm developing an application which needs to redirect the phone's sound player/tuner's sound to the loudspeaker, even if the headphones are plugged in.
I'm trying to create an object of CAudioOutput and call SetAudioOutputL( TAudioOutputPreference ePreference) over it. However, to create an object of CAudioOutput, I need to have a reference of CMdaAudioPlayerUtility, CMdaAudioRecorderUtility, CMdaAudioOutputStream or others. How can I get access to the phones default sound/tuner player to pass this across as reference, for the above method to work?
Also, is there another way to set some global setting to redirect the output to the loudspeaker even if the headsets are plugged in?