GSDP:GAM100/CProcessing/CP Sound Play()

CP_Sound_Play()

Description

Play a CP_Sound by inputting the CP_Sound.

The sound will only be played once in CP_SOUND_GROUP_SFX.

Parameters

CP_Sound_Play(CP_Sound sound)

  • sound - (CP_Sound) The sound that you want to be played.

Example

CP_Sound mySound = NULL;

void init()
{
  mySound = CP_Sound_Load("./Assets/Justins_voice.wav");
}

void update()
{
  CP_Settings_Background(CP_Color_Create(255, 255, 255, 255));

  CP_Sound_Play(mySound);
}

void shutdown()
{
  CP_Sound_Free(mySound);
}

Related