/****************************************************************************** * Copyright (c) 2004-2005 palmOne, Inc. or its subsidiaries. * All rights reserved. *****************************************************************************/ /** * @defgroup Sound Sound Library * @brief This library provides support for the specific sound functionality * of the Treo smartphones. * * Developers should be able to use Palm OS Sound Manager APIs for most of the work. * The calling application should always load this library with SysLibLoad() before * use, even if it is already open by another application (ie. SysLibFind() returns * a valid refNum). When the application is done with the library it should be * unloaded with SysLibRemove(). We do this because there is no good way to synchronize * loading and unloading of libraries among multiple applications. It also greatly * simplifies internal synchronization. * * @{ * @} */ /** * @ingroup Sound */ /** * @file HsSoundLibCommon.h * * @brief Public 68K common header file for sound support for Treo 600 and * Treo 650 smartphones. * * This file contains the common constants and structures to be used with * the sound library. * */ #ifndef __HSSOUNDLIB_COMMON__H__ #define __HSSOUNDLIB_COMMON__H__ /*********************************************************************** * Palm OS common definitions ***********************************************************************/ #include #include /** * @name HsSoundLib information * */ /*@{*/ #define hsSndLibVersion 0x01070000 /**> 8) / (stepDB & 0x0F). */ UInt16 boostDB; /**< How many dBs with boost = (boostDB >> 8) / (boostDB & 0x0F). */ UInt16 reserved1; /**< Reserved field, set to zero */ UInt16 reserved2; /**< Reserved field, set to zero */ } HsSndPortInfo, *HsSndPortInfoPtr; /** * @name Command flag settings * * Used with the "Commandflags" parameter in HsSndFormatPlay function. */ /*@{*/ #define hsSndCmdFlags_noWait 0x00000001 /**< Use wait period for the play command. */ #define hsSndCmdFlags_yesWait 0x00000000 /**< No wait period for the play command. */ #define hsSndCmdFlags_waitMask 0x00000001 /**> 8) #define hsSndBufControl_repeatForever (0xFF) /*@}*/ // =============================================================================================== // Gain Envelope Feature Support // =============================================================================================== /** * @name Gain Envelope Definitions * * Used as attackEnvID parameter to function PmSndStreamSetAttackEnvID. */ /*@{*/ #define pmSndAttackEnvIDRings (hsSndBufFlags_attackEnvRings) /**< The ringtone attack envelope ramp-up to low volume initially, and to full volume after about 4 seconds */ // =============================================================================================== // Sound Preference Definitions (compatible with SndBayID and SndPortID) // =============================================================================================== #define pmSndBayID_AUDP 0x0F000000 /**< we are reserving SndBayID 15 for audio preference purposes */ #define PM_AUDP_CLASS_MASK 0x4000 // Utility macro to associate special port class marker to this IDs (so we can use it as an HsSndPortClass parameter) #define PM_AUDP_CLASS(n) ((n) | PM_AUDP_CLASS_MASK) /**< utility to associate preferences class marker to prefIDs */ #define pmSndPrefID_AppsGroupHoldType PM_AUDP_CLASS(0x0001) /**< specify how to hold application audio (mute/pause) */ #define pmSndPrefID_JackOutIfMicUnused PM_AUDP_CLASS(0x0002) /**< shall we force jack out to stereo if Mic not in use? */ #define pmSndPrefID_PhoneRxGainLimit PM_AUDP_CLASS(0x0003) /**< set if gain-limit phone Rx to receiver speaker */ #define pmSndPrefID_WakeOnAnswerBtn PM_AUDP_CLASS(0x0004) /**< set to be able to wake device when headset answer button is pressed */ #define pmSndPrefID_AudioTable PM_AUDP_CLASS(0x0005) /**< pass pointer to PmSndGain8Table to load for use, pass zero to return to default */ #define pmSndPrefID_GsmMccArray PM_AUDP_CLASS(0x0006) /**< pass pointer to PmSndGsmMccArray to load for use, pass zero to return to default */ #define pmSndPrefID_AthenaActive PM_AUDP_CLASS(0x0007) /**< set to activate audio paths to multi-connector, clear to return to normal */ #define pmSndPrefID_SleepMode PM_AUDP_CLASS(0x0008) /**< set to zero for normal sleep, other values for partial audio sleep modes (for internal use only) */ #define pmSndPrefID_AGCEvent PM_AUDP_CLASS(0x0009) /**< set to temporarily activate AGC if required (only useful when AGC has been disabled before hand) */ typedef UInt16 PmSndPrefID; // Parameters to use with pmSndPrefID_WakeOnAnswerBtn #define pmSndPref_WakeOnAnswerBtn_Disable (0) /**< disable wake up on answer button feature */ #define pmSndPref_WakeOnAnswerBtn_Enable (1) /**< enable wake up on answer button feature */ // Parameters to use with pmSndPrefID_AthenaActive #define pmSndPref_AthenaActive_No (0) /**< disable routing to Athena path for automatic switches */ #define pmSndPref_AthenaActive_Yes (1) /**< enable routing to Athena path for automatic switches */ // Utility macro to associate the hsSndBayID_Radio to other elements #define PM_AUDP(n) ((n) | pmSndBayID_AUDP) /**< utility to associate the Preference Bay ID with other element ID */ // Use these for HsSndSwitchID in the Preferences patch bay #define pmSndSwitchID_Preferences PM_AUDP(0x00400000) /**< used with the HsSoundLib Switch calls to set and get sound preference data */ #endif // __HSSOUNDLIB_COMMON__H__