示例#1
0
	midi_loader(source &src, std::string const &filename) : source_(src), filename_(filename) {
		src.init_midi();
		source_.player.reset(new_fluid_player(source_.synth.get()), &delete_fluid_player);
		if (fluid_player_add(source_.player.get(), filename.c_str()) == FLUID_FAILED)
			Output::Warning("Couldn't load %s midi sound.", filename.c_str());
		if (fluid_player_play(source_.player.get()) == FLUID_FAILED)
			Output::Warning("Couldn't play %s midi sound.", filename.c_str());
	}
示例#2
0
	midi_loader(source &src, std::string const &filename) : source_(src), filename_(filename) {
		src.init_midi();
		source_.player.reset(new_fluid_player(source_.synth.get()), &delete_fluid_player);
		BOOST_VERIFY(fluid_player_add(source_.player.get(), filename.c_str()) != FLUID_FAILED);
		BOOST_VERIFY(fluid_player_play(source_.player.get()) != FLUID_FAILED);
	}