GSDP:GAM100/CProcessing/CP Sound LoadMusic()

From Inside
Jump to: navigation, search

CP_Sound_LoadMusic()

Description

Load a CP_Sound by inputting the file path of the music file as a string (const char*).

Parameters

CP_Sound_LoadMusic(const char* filepath)

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

Example

CP_Sound mySound = NULL;

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

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

  CP_Sound_Play(mySound);
}

void shutdown()
{
  CP_Sound_Free(mySound);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>