|
API Guide Home (Online version only) |
![]() |
Notes:
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 TonesLib.h.
Go to the source code of this file.
| #define kTonesLibVersionEscalation 10 |
Minimum db version of TonesLibrary database that implements escalation Done this way since we have no GetLibVersion() API.
Definition at line 35 of file TonesLib.h.
| Err TonesLibAddMidiTone | ( | UInt16 | refNum, | |
| MemHandle | midiTone, | |||
| CharPtr | toneName, | |||
| Boolean | protectedTone | |||
| ) |
Add a MIDI tone to the system tone database.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| midiTone,: | IN: The data buffer handle where the midi tone data is located. | |
| toneName,: | IN: Name of the tone. | |
| protectedTone,: | IN: Save tone as protected record in the tone database. |
Close the Tones library instance.
| refNum,: | IN: Library reference number from SysLibLoad. |
| Err TonesLibDeleteTone | ( | UInt16 | refNum, | |
| ToneIdentifier | toneId | |||
| ) |
Delete a tone given its ID.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| toneId,: | IN: ID of the tone to be deleted. |
Display the UI to create and/or manages tones.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| flags,: | IN: Set to kTonesDialogFlagNonModal to hide the Done button from the dialog. |
Query or toggle whether ring tones are escalated in volume when played.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| set,: | IN: true if setting, false if querying. | |
| value,: | IN: Value to set if setting, queried value if querying. |
| Err TonesLibGetSoundOnVolume | ( | UInt16 | refNum, | |
| SoundPrefType | soundType, | |||
| ToneVolume * | soundOnVolumeP | |||
| ) |
Get the sound-on volume of a sound type.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| soundType,: | IN: Type of (application) sound. | |
| soundOnVolumeP,: | OUT: Volume of the sound. |
| Err TonesLibGetSoundPrefs | ( | UInt16 | refNum, | |
| SoundPrefType | soundType, | |||
| SoundPreference * | soundPrefs | |||
| ) |
Get the sound preference for a type of (application) sound.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| soundType,: | IN: Type of (application: email, SMS, phone call, etc) sound. | |
| soundPrefs,: | OUT: Preference settings for a type of sound. |
| Err TonesLibGetToneIDs | ( | UInt16 | refNum, | |
| ToneIdentifier ** | list, | |||
| UInt16 * | listLength | |||
| ) |
Get the list of tone IDs.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| list,: | IN: Pointer to the list of tone IDs to return. | |
| listLength,: | OUT: Count of how many tone IDs are in the list. |
| Err TonesLibGetToneList | ( | UInt16 | refNum, | |
| ToneItemPtr * | list, | |||
| UInt16 * | listLength | |||
| ) |
Get the list of tone names.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| list,: | IN: Pointer to the list of tone names to return. | |
| listLength,: | OUT: Count of how many tone names are in the list. |
| Err TonesLibGetToneName | ( | UInt16 | refNum, | |
| ToneIdentifier | toneId, | |||
| CharPtr | name, | |||
| UInt16 | maxLength | |||
| ) |
Get the name of a certain tone given its ID.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| toneId,: | IN: Tone ID of the tone name to get. | |
| name,: | I/O: Pointer to the returned tone name. | |
| maxLength,: | IN: Size of the name buffer in bytes. |
| Err TonesLibGetToneSize | ( | UInt16 | refNum, | |
| ToneIdentifier | toneId, | |||
| UInt32 * | sizeP | |||
| ) |
Get the tone data size given its ID.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| toneId,: | IN: ID number of the tone. | |
| sizeP,: | OUT: Size of the specified tone. |
Create the default tone database if it does not exist, and verify that all the tones in a database are resident on the device.
| refNum,: | IN: Library reference number from SysLibLoad. |
Display UI to manage tones. Users can delete, play, or send a tone from this UI.
| refNum,: | IN: Library reference number from SysLibLoad. |
Open and initialize the Tones library instance.
| refNum,: | IN: Library reference number from SysLibLoad. |
Display the UI to select tones and return the tone type, tone name, and handle to the tone data.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| toneType,: | OUT: Type of tone. | |
| toneH,: | OUT: Handle to the tone selected. Must be freed by the caller. | |
| name,: | OUT: Name of the tone. |
| Err TonesLibPlayRingTone | ( | UInt16 | refNum, | |
| ToneIdentifier | toneId, | |||
| UInt16 | playCount, | |||
| ToneVolume | volume, | |||
| ToneVibrateType | vibrate, | |||
| Boolean | blocking | |||
| ) |
Play a ring tone given its ID. The difference between this and PlayTone is that tones played this way are affected by TonesLibEscalateRingTones().
| refNum,: | IN: Library reference number from SysLibLoad. | |
| toneId,: | IN: ID of the tone to play. | |
| playCount,: | IN: Number of times you want the tone repeated. | |
| volume,: | IN: Volume level at which you want the tone played. | |
| vibrate,: | IN: Vibrate mode to use when playing the tone. | |
| blocking,: | IN: Controls whether the tone play is a blocking call or play in the background and return immediately. |
| Err TonesLibPlayTone | ( | UInt16 | refNum, | |
| ToneIdentifier | toneId, | |||
| UInt16 | playCount, | |||
| ToneVolume | volume, | |||
| ToneVibrateType | vibrate, | |||
| Boolean | blocking | |||
| ) |
Play a tone given its ID.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| toneId,: | IN: ID of the tone to play. | |
| playCount,: | IN: Number of times you want the tone repeated. | |
| volume,: | IN: Volume level at which you want the tone played. | |
| vibrate,: | IN: Vibrate mode to use when playing the tone. | |
| blocking,: | IN: Controls whether the tone play is a blocking call or play in the background and return immediately. |
No definition.
| refNum,: | IN: Library reference number from SysLibLoad. |
| Err TonesLibSetSoundOnVolume | ( | UInt16 | refNum, | |
| SoundPrefType | soundType, | |||
| ToneVolume | soundOnVolume | |||
| ) |
Set the sound-on volume of a sound type.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| soundType,: | IN: Type of (application) sound. | |
| soundOnVolume,: | IN: Volume of the tone. |
| Err TonesLibSetSoundPrefs | ( | UInt16 | refNum, | |
| SoundPrefType | soundType, | |||
| SoundPreference * | soundPrefs | |||
| ) |
Set the sound preference for a type of (application) sound.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| soundType,: | IN: Type of (application) sound. | |
| soundPrefs,: | IN: Preference settings for the type of sound. |
Standard function to receive Palm OS sleep notification.
| refNum,: | IN: Library reference number from SysLibLoad. |
Stop the playback of the current tone.
| refNum,: | IN: Library reference number from SysLibLoad. |
Close the reference to the tone stream.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| stream,: | IN: Reference to the steam returned by TonesLibToneCreate(). |
| Err TonesLibToneCreate | ( | UInt16 | refNum, | |
| UInt32 * | streamP, | |||
| ToneType | toneType, | |||
| CharPtr | toneName, | |||
| Boolean | protectedTone | |||
| ) |
Create new tone and return the pointer to the start of the sound stream.
| refNum,: | IN: Library reference number from SysLibLoad. | |
| streamP,: | OUT: Pointer to the sound stream of the new tone. | |
| toneType,: | IN: Type of the tone. |
| toneName,: | IN: Name of the tone. | |
| protectedTone,: | IN: Save tone as protected record in the tone database. |
Write sound data to the stream returned by TonesLibToneCreate().
| refNum,: | IN: Library reference number from SysLibLoad. | |
| stream,: | IN: Reference to the steam returned by TonesLibToneCreate(). | |
| dataP,: | IN: Pointer to the Tone(Sound) data. | |
| size,: | IN: Size of the data to be written. |
Standard function to receive Palm OS wake up notification.
| refNum,: | IN: Library reference number from SysLibLoad. |
| Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:08:07 2008 for Palm API Guide |