예제 #1
0
	ISiv3DAudio* ISiv3DAudio::Create()
	{
	# if defined(SIV3D_TARGET_WINDOWS)

		ISiv3DAudio* pAudio = nullptr;

		if (detail::CAudio_X28_IsAvailable())
		{
			pAudio = detail::CreateCAudio_X28();
		}
		else
		{
			pAudio = detail::CreateCAudio_X27();
		}

		if (!pAudio->hasAudioDevice())
		{
			delete pAudio;

			return new CAudio_Null;
		}

		return pAudio;

	# elif defined(SIV3D_TARGET_MACOS) || defined(SIV3D_TARGET_LINUX)
	
		return new CAudio_AL;

	# endif
	}
예제 #2
0
	ISiv3DAudio* ISiv3DAudio::Create()
	{
	# if defined(SIV3D_TARGET_WINDOWS)

		ISiv3DAudio* pAudio = detail::IsX28Available() ?
			detail::CreateCAudio_X28() : detail::CreateCAudio_X27();

		if (!pAudio->hasAudioDevice())
		{
			delete pAudio;

			pAudio = new CAudio_Null;
		}

		return pAudio;

	# elif defined(SIV3D_TARGET_MACOS) || defined(SIV3D_TARGET_LINUX)
	
		return new CAudio_AL;

	# endif
	}