Beispiel #1
0
void AudioHandlerAl::PlayBgm(const std::string& resource, float volume)
{
  if (!platform_helper_->IsCanPlayBgm())
    return;
  
  if (bgm_source_ref_ != -1)
    StopBgm();
  
  if (resource.empty())
    return;
  
  if (platform_helper_->PlayBgm(resource, volume))
  {
    bgm_source_ref_ = 0;
  }
  else
  {
    bgm_source_ref_ = PlaySound(resource, true, volume, 1.0f);
    
    if (bgm_source_ref_ != -1)
    {
      sources_[bgm_source_ref_].volume = volume;
      alSourcef(sources_[bgm_source_ref_].source, AL_GAIN, volume);
    }
  }
}
Beispiel #2
0
/*-----------------------------------------------------------------------------
	終了
-----------------------------------------------------------------------------*/
void CTitle::Uninit(void)
{
	StopBgm();

	m_pInputCommand->Uninit();
	delete m_pInputCommand;

	// 描画対象オブジェクトの開放
	CScene::ReleaseAll();
}