API Guide Home (Online version only) |

# HsSndBufferData Struct Reference

## Detailed Description

Holds sound buffer information.

When using the hsSndCmdPlay command in function HsSndFormatPlay, you should pass a pointer to a properly filled HsSndBufferData structure. This structure provides information about the buffer of coded audio data that is going to be processed and played.

Definition at line 550 of file HsSoundLibCommon.h.

## Data Fields

- UInt32 signature
- UInt32 flags
- UInt32 amplitude
- void * buffer
- UInt32 bufferSize
- HsSndBufferProc progress_callback
- void * progress_userdata
- HsSndBufferProc completion_callback
- void * completion_userdata
- UInt32 controls
- UInt32 reserved1
- UInt32 reserved2

## Field Documentation

UInt32 signature

Always set to hsSndBufferData_Signature or error returned.

Definition at line 552 of file HsSoundLibCommon.h.

UInt32 flags

Flags and status bits for the buffer. Use the hsSndBufferFlags_* symbols appropriately. Set any undefined or unused flags to zero.

Definition at line 553 of file HsSoundLibCommon.h.

UInt32 amplitude

Volume level for playback. (Valid range from 0 to hsSndAmplitude_unity.)

Definition at line 554 of file HsSoundLibCommon.h.

void* buffer

Pointer to beginning of coded audio data to process and/or play.

Definition at line 555 of file HsSoundLibCommon.h.

UInt32 bufferSize

Size in bytes of the buffer of coded audio data.

Definition at line 556 of file HsSoundLibCommon.h.

HsSndBufferProc progress_callback

When Not NULL, is invoked at regular intervals. If progress_callback returns an error, then the play session terminates.

Definition at line 557 of file HsSoundLibCommon.h.

void* progress_userdata

Passed to progress_callback when invoked.

Definition at line 558 of file HsSoundLibCommon.h.

HsSndBufferProc completion_callback

When Not NULL, it will be invoked when buffer processing completed.

Definition at line 559 of file HsSoundLibCommon.h.

void* completion_userdata

Passed to completion_callback when invoked.

Definition at line 560 of file HsSoundLibCommon.h.

UInt32 controls

Compound field with repeat count and end delay controls. Use HsSndBufControl_Set* macros with this field. Repeat Field: valid range from 1 to 254, or hsSndBufControl_repeatForever (255). The processing of the buffer will be looped according to this number. When repeatForever is used, then termination should be done by returning an error code from the progress callback. Alternatively, for non-blocking playback, the caller may issue another "Play" call with the "Stop" command. This field is valid and non-zero when hsSndBufFlags_yesRepeat is set in the buffer flags, otherwise this field must be set to zero. A repeat value of 1 means play one time. Values of 2 and greater will perform the requested number of playbacks by looping on the same buffer data. Use HsSndBufControl_SetRepeat macro to set values in this field. endDelay fld: Valid range from 1 to 255, each unit is a 1/50th second delay. Use HsSndBufControl_SetEndDelay macro to set values in this field. This field is valid and non-zero when hsSndBufFlags_yesEndDelay is set in the buffer flags, otherwise this field must be set to zero.

Definition at line 578 of file HsSoundLibCommon.h.

UInt32 reserved1

reserved, must set to zero

Definition at line 579 of file HsSoundLibCommon.h.

UInt32 reserved2

reserved, must set to zero

Definition at line 580 of file HsSoundLibCommon.h.

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