XgmSetPcm

Last Modified: 1/3/2021

Loads the PCM data into memory to be used by the XgmPlayPcm command.

Arguments

NameTypeRequiredDescription
LineLabel LineLabel Yes The line label where the PCM sample is located.
Channel Integer Yes The channel to play the sample on. Valid channels are 0 through 3.
Priority Integer Yes Sets the priority of the sample. Priority values range from 0 to 15, with 0 being the lowest.

Example

Syntax: XgmSetPcm <LineLabel>,<Chanell>,<Priority>
    On vInt GoSub Vbl
    Enable vInt
    
    XgmSetPcm MyPCMSample,1,1
    XgmPlayPcm
    
    While 1
        Sleep 1
    Wend
    
Vbl:
    XgmVintProc
    Return
 
    Asm
MyPCMSample:
    INCBIN "C:\SecondBASICStudio\bin\null.raw"
MyPCMSample_end:
    align 256
    End Asm

Remarks

If you're operating SecondBASIC Studio under Single Document Mode, you'll need to manually insert the PCM data in as seen in the example above. In Project Mode, you can add your XGM files to the project and they will automatically be included during compilation. You can drag the PCM file from the Project Explorer to the code window for automatic code generation.

If a sample with a lower Priority is played at the same time as another sample, the lower Priority won't be played.

See Also

XgmPlayPcm, XgmResumeMusic, XgmSetBusProtection, XgmSetTempo, XgmStartMusic, XgmStopMusic, XgmStopPcm, XgmTrack, XgmVintProc