GSDP:GAM100/CProcessing/CP Sound PlayMusic()
From Inside
< GSDP:GAM100 | CProcessing
CP_Sound_PlayMusic()
Description
Plays a given CP_Sound.
The sound will loop continuously in 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
- Main Page
- CP_Sound
- CP_Sound_Load()
- CP_Sound_LoadMusic()
- CP_Sound_Play()
- CP_Sound_PlayMusic()
- CP_Sound_PlayAdvanced()
- CP_Sound_Free()
- CP_Sound_PauseAll()
- CP_Sound_PauseGroup()
- CP_Sound_ResumeAll()
- CP_Sound_ResumeGroup()
- CP_Sound_StopAll()
- CP_Sound_StopGroup()
- CP_Sound_SetGroupVolume()
- CP_Sound_GetGroupVolume()
- CP_Sound_SetGroupPitch()
- CP_Sound_GetGroupPitch()