Пример #1
0
bool SoundTownsPC98_v2::init() {
	_driver = new TownsPC98_AudioDriver(_mixer, _vm->gameFlags().platform == Common::kPlatformPC98 ?
		TownsPC98_AudioDriver::kType86 : TownsPC98_AudioDriver::kTypeTowns);

	if (_vm->gameFlags().platform == Common::kPlatformFMTowns) {
		if (_resInfo[_currentResourceSet])
			if (_resInfo[_currentResourceSet]->cdaTableSize)
				_vm->checkCD();
		// FIXME: While checking for 'track1.XXX(X)' looks like
		// a good idea, we should definitely not be doing this
		// here. Basically our filenaming scheme could change
		// or we could add support for other audio formats. Also
		// this misses the possibility that we play the tracks
		// right off CD. So we should find another way to
		// check if we have access to CD audio.
		Resource *r = _vm->resource();
		if (_musicEnabled &&
		    (r->exists("track1.mp3") || r->exists("track1.ogg") || r->exists("track1.flac") || r->exists("track1.fla")
		     || r->exists("track01.mp3") || r->exists("track01.ogg") || r->exists("track01.flac") || r->exists("track01.fla")))
				_musicEnabled = 2;
		else
			_musicEnabled = 1;
		_useFmSfx = false;

	} else {
		_useFmSfx = true;
	}

	bool reslt = _driver->init();
	updateVolumeSettings();
	return reslt;
}
Пример #2
0
bool SoundPC98::init() {
	_driver = new TownsPC98_AudioDriver(_mixer, TownsPC98_AudioDriver::kType26);
	bool reslt = _driver->init();
	updateVolumeSettings();

	// Initialize CD for audio
	g_system->getAudioCDManager()->open();

	return reslt;
}
Пример #3
0
bool SoundTowns_Darkmoon::init() {
	if (!_intf->init())
		return false;

	_intf->callback(21, 255, 1);
	_intf->callback(21, 0, 1);
	_intf->callback(22, 255, 221);

	_intf->callback(70, 0x31);
	_intf->callback(33, 1);
	_intf->callback(8, 0x47, 127);
	_intf->callback(67, 1, 127, 127);

	_intf->setSoundEffectChanMask(-1);

	_lastSfxChan = 0x46;
	_lastEnvChan = 0x40;

	updateVolumeSettings();

	return true;
}
Пример #4
0
bool SoundPC98::init() {
	_driver = new TownsPC98_AudioDriver(_mixer, TownsPC98_AudioDriver::kType26);
	bool reslt = _driver->init();
	updateVolumeSettings();
	return reslt;
}