GSDP:GAM100/CProcessing/CP Sound PlayMusic()

From Inside
< GSDP:GAM100‎ | CProcessing
Revision as of 15:47, 13 January 2021 by >Kenny.mecham (New page: =CP_Sound_PlayMusic()= == Description == Plays a given CP_Sound. The sound will loop continuously in the [[GSDP:GAM100/CProcessing/CP_SOUND_GROUP|CP_SO...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

CP_Sound_PlayMusic()

Description

Plays a given CP_Sound. The sound will loop continuously in the CP_SOUND_GROUP : CP_SOUND_GROUP_MUSIC.

Parameters

CP_Sound_PlayMusic(const char* filepath)

  • filepath - (const char*) The path to the sound file that you want to load.

Example

CP_Sound mySound = NULL;

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

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

  CP_Sound_PlayMusic(myMusic);
}

void shutdown()
{
  CP_Sound_Free(myMusic);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>