Hi,

You can start with the following and search for the defines in the Palm SDK. I could not find any documentation except for what is in the headers:(.

static int SetOutputPort(char index){
        UInt16 libRef;
        int err;

        err = SysLibLoad(hsSoundLibTypeID,
                hsSoundLibCreatorID, &libRef);

        HsSndOpen(libRef);
        /*
        if (index == 0) {
                HsSndSwitchSetPort(libRef, hsSndSwitchID_InHostPlay,
                        hsSndPortID_OutHeadphones, hsSndPortClass_Real);
        }

        else if (index == 1) {
                HsSndSwitchSetPort(libRef, hsSndSwitchID_InHostPlay,
                        hsSndPortID_OutSpeaker, hsSndPortClass_Real);
        }

        else if (index == 2) {
                HsSndSwitchSetPort(libRef, hsSndSwitchID_InHostPlay,
                        hsSndPortID_OutSpeakerAuto, hsSndPortClass_Real);
        }
        */
        HsSndSwitchSetPort(libRef, hsSndSwitchID_InHostPlay,
                hsSndPortID_OutSpeaker, hsSndPortClass_Real);


        HsSndSwitchSetPort(libRef, hsSndSwitchID_InRadioSpkr,
                hsSndPortID_OutReceiver, hsSndPortClass_Real);
/*
        HsSndSwitchSetPort(libRef, hsSndSwitchID_InRadioSpkr,
                hsSndPortID_OutSpeaker, hsSndPortClass_BaseDefault);
*/

        HsSndSwitchSetPort(libRef, hsSndSwitchID_OutRadioMic,
                hsSndPortID_InBaseMic, hsSndPortClass_Real);

        HsSndClose(libRef);
        return(1);
}

Hope it helps.

Regards,
Miro Pomsar



Christopher Stamper wrote:
I'm trying to make an application (NOT for Treo/Cent) that can make an OS 5
pda output sounds, such as MP3's, out of the headhone jack *ONLY*. So if,
when playing an MP3 w/ ptunes, you unplug the headphones, it will *not* play
through the speaker.

I don't want to make a player, just a small application that can 'disable'
the speaker. Maybe even for individual apps, though that's not too
important.

Is that possible?

(I think not, but...)


--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to