API Guide Home
(Online version only)

PalmAudioPlayback.h File Reference


Detailed Description

Public 68K include file that supports the stopping of audio playback on Treo 600 and Treo 650 smartphones.

This header file and associated header files support the specific sound functionality of the Treo smartphones. You should use the Palm OS Sound Manager APIs for most of your work.

Notes: This header contains a notification to call for stopping any existing background audio playback.

Any application ( usually video capture ) that needs to stop and eventually resume audio playback should use this header. Stopping or resuming playback is done by throwing a notification.

Audio playback applications should register for this notification and stop playback when they get the stop action code. They can optionally resume action when they get a notification with a resume action code. However resume is not a mandatory feature neither for the calling application nor for the audio application. In other words, the audio application may never get a resume after a stop action code.

Usage for any application requesting stop of audio playback:

PalmAudioPlaybackRequestStop('cccc'); // to stop background playback PalmAudioPlaybackRequestResume('cccc'); // to resume background playback

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.

Definition in file PalmAudioPlayback.h.

Include dependency graph for PalmAudioPlayback.h:

Go to the source code of this file.

Data Structures

Defines

PalmAudioPlayback information and notification
Audio playback action codes
Audio playback helper macros

Typedefs


Define Documentation

#define kPalmAudioPlaybackActionCodeRequestResume   ((PalmAudioPlaybackActionCodeType)2)

Playback resume action code.

Definition at line 97 of file PalmAudioPlayback.h.

#define kPalmAudioPlaybackActionCodeRequestStop   ((PalmAudioPlaybackActionCodeType)1)

Playback stop action code.

Definition at line 94 of file PalmAudioPlayback.h.

#define kPalmAudioPlaybackCreator   'apbP'

PalmAudioPlayback creator ID.

Definition at line 74 of file PalmAudioPlayback.h.

#define kPalmAudioPlaybackNotify1   sysMakeROMVersion(1, 0, 0, sysROMStageRelease, 0)

Definition at line 68 of file PalmAudioPlayback.h.

#define kPalmAudioPlaybackNotifyEvent   kPalmAudioPlaybackCreator

Playback notification event ID.

Applications playing audio should register for this notification and stop or optionally resume playback depending on the action code the application receives.

Definition at line 81 of file PalmAudioPlayback.h.

#define kPalmAudioPlaybackNotifyVersion   kPalmAudioPlaybackNotify1

Version of the PalmAudioPlayback library.

Definition at line 71 of file PalmAudioPlayback.h.

#define PalmAudioPlaybackRequestResume ( creator   ) 

Value:

Request to resume playback. Any application that needs to request that audio playback be resumed should use this macro. "creator" is the creator id of the calling function.

Definition at line 141 of file PalmAudioPlayback.h.

#define PalmAudioPlaybackRequestStop ( creator   ) 

Value:

Request to stop playback. Any application that needs to request a stop of audio playback should use this macro. "creator" is the creator id of the calling function.

Definition at line 117 of file PalmAudioPlayback.h.

#define PalmAudioPlaybackSendRequest ( requestP,
creator   ) 

Value:

{ \
        SysNotifyParamType      notify; \
        MemSet(&notify, sizeof(SysNotifyParamType), 0); \
        notify.notifyType       = kPalmAudioPlaybackNotifyEvent; \
        notify.broadcaster      = creator; \
        notify.notifyDetailsP   = (void*)requestP; \
        SysNotifyBroadcast(&notify); \
    }
Actual broadcast of kPalmAudioPlaybackNotifyEvent notification. Used by Stop and Resume macros.

Definition at line 165 of file PalmAudioPlayback.h.


Typedef Documentation

Holds action codes for the kPalmAudioPlaybackNotifyEvent broadcast.

Definition at line 85 of file PalmAudioPlayback.h.

Audio playback notification structure.

Structure that is sent as part of notifyDetailsP when a kPalmAudioPlaybackNotifyEvent is thrown.


Top Palm Developer Network
© 2004-2008, Palm, Inc. All rights reserved.
Generated on Fri Jun 13 10:07:41 2008 for Palm API Guide