GSDP:GAM100/CProcessing/CP Sound

From Inside
Jump to: navigation, search

CP_Sound

Description

CP_Sound can be used to store a loaded sound. Use CP_Sound_Load() to load a sound and CP_Sound_Play() to play a sound.

Example

CP_Sound mySound;
void init()
{
  mySound = CP_Sound_Load("./Assets/808cowbell.wav");
}

void update() 
{
    // If the left mouse is clicked, play the sound
    if (CP_Input_MouseClicked())
        CP_Sound_Play(mySound, false);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>