Voice Parameters

Overview

The following are the operations related to voice parameters. Call the function appropriate to each of these operations.

Examples

The following are code examples.

#include <revolution.h>

#ifdef SET_PARAMS_WITH_AX_API

    AXPBADDR addr;

    addr.loopFlag           = AXPBADDR_LOOP_ON;
    addr.format             = AX_PB_FORMAT_ADPCM;
    addr.loopAddressHi      = (u16)(loopAddress >> 16);
    addr.loopAddressLo      = (u16)(loopAddress & 0xffff);
    addr.endAddressHi       = (u16)(endAddress >> 16);
    addr.endAddressLo       = (u16)(endAddress & 0xffff);
    addr.currentAddressHi   = (u16)(startAddress >> 16);
    addr.currentAddressLo   = (u16)(startAddress & 0xffff);

    AXSetVoiceAddr(axvpb, &addr);

#else

    int old = OSDisableInterrupts();

    axvpb->addr.loopFlag           = AXPBADDR_LOOP_ON;
    axvpb->addr.format             = AX_PB_FORMAT_ADPCM;
    axvpb->addr.loopAddressHi      = (u16)(loopAddress >> 16);
    axvpb->addr.loopAddressLo      = (u16)(loopAddress & 0xffff);
    axvpb->addr.endAddressHi       = (u16)(endAddress >> 16);
    axvpb->addr.endAddressLo       = (u16)(endAddress & 0xffff);
    axvpb->addr.currentAddressHi   = (u16)(startAddress >> 16);
    axvpb->addr.currentAddressLo   = (u16)(startAddress & 0xffff);
    
    axvpb->sync |= AX_SYNC_USER_ADDR;

    OSRestoreInterrupts(old);

#endif

// This is only a code example. You must also set the
// loop context for ADPCM-encoded sounds.

Revision History

2007/10/02 Revised the entire document following changes to the structure of the function reference.
2006/03/01 Initial version.


CONFIDENTIAL