API Guide Home
(Online version only)

PalmSoundCustomCtrl.h File Reference


Detailed Description

Public 68K include file for the Sound Manager custom controls for the IMA_ADPCM codec for 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: How to use the IMA_ADPCM code custom control:

When you create a stream, make sure you set the format to sndFormatIMA_ADPCM and that the type is set to 0.

Then use the custom control to set the block align paramter:

SndCodecCustomControlType ct; UInt16 blockAlign= Swap16(blockAlign); // This needs to be in little endian ct.apiCreator = Swap32(codecDriverIMAADPCM); ct.apiSelector = Swap32(codecIMAADPCMSetBlockSize); ct.valueP = (void*)Swap32(&blockAlign); ct.valueLenP = NULL; err = SndStreamDeviceControl(streamRef, sndControlCodecCustomControl, &ct, sizeof(ct));

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 PalmSoundCustomCtrl.h.

Go to the source code of this file.

Data Structures

Defines

Custom Control for the IMA_ADPCM codec

Enumerations


Define Documentation

#define codecDriverIMAADPCM   'APCM'

IMA ADPCM codec driver.

Definition at line 55 of file PalmSoundCustomCtrl.h.

#define codecIMAADPCMSetBlockSize   0x0001

IMA ADPCM block size set command.

Definition at line 56 of file PalmSoundCustomCtrl.h.


Enumeration Type Documentation

anonymous enum

IMA_ADPCM codec Custom Control type

Enumerator:
sndControlCodecCustomControl  Param is a SndCodecCustomControlType*.

Definition at line 63 of file PalmSoundCustomCtrl.h.

00063      {
00064     sndControlCodecCustomControl = 12   /**< Param is a SndCodecCustomControlType*. */
00065 };


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