2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2002-12-08 20:19:01 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-12-08 20:19:01 +00:00
|
|
|
*
|
2006-02-11 12:47:47 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2002-12-08 20:19:01 +00:00
|
|
|
*/
|
|
|
|
|
2010-06-22 15:30:41 +00:00
|
|
|
#include "sound/null.h"
|
2008-05-14 14:56:29 +00:00
|
|
|
|
2010-06-21 21:36:36 +00:00
|
|
|
Common::Error NullMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle) const {
|
2008-05-14 14:56:29 +00:00
|
|
|
*mididriver = new MidiDriver_NULL();
|
|
|
|
|
2008-11-05 17:24:56 +00:00
|
|
|
return Common::kNoError;
|
2008-05-14 14:56:29 +00:00
|
|
|
}
|
|
|
|
|
2008-06-13 16:04:43 +00:00
|
|
|
MusicDevices NullMusicPlugin::getDevices() const {
|
|
|
|
MusicDevices devices;
|
2010-06-26 15:48:03 +00:00
|
|
|
devices.push_back(MusicDevice(this, "", MT_NULL));
|
2008-06-13 16:04:43 +00:00
|
|
|
return devices;
|
|
|
|
}
|
|
|
|
|
2010-06-21 21:36:36 +00:00
|
|
|
class AutoMusicPlugin : public NullMusicPlugin {
|
|
|
|
public:
|
|
|
|
const char *getName() const {
|
|
|
|
return _s("<default>");
|
|
|
|
}
|
2006-02-11 19:01:06 +00:00
|
|
|
|
2010-06-21 21:36:36 +00:00
|
|
|
const char *getId() const {
|
|
|
|
return "auto";
|
|
|
|
}
|
2010-06-25 18:47:52 +00:00
|
|
|
MusicDevices getDevices() const;
|
2010-06-21 21:36:36 +00:00
|
|
|
};
|
2008-05-14 14:56:29 +00:00
|
|
|
|
2010-06-25 18:47:52 +00:00
|
|
|
MusicDevices AutoMusicPlugin::getDevices() const {
|
|
|
|
MusicDevices devices;
|
2010-06-26 15:48:03 +00:00
|
|
|
devices.push_back(MusicDevice(this, "", MT_AUTO));
|
2010-06-25 18:47:52 +00:00
|
|
|
return devices;
|
|
|
|
}
|
|
|
|
|
2008-05-14 14:56:29 +00:00
|
|
|
//#if PLUGIN_ENABLED_DYNAMIC(NULL)
|
2008-06-13 14:30:47 +00:00
|
|
|
//REGISTER_PLUGIN_DYNAMIC(NULL, PLUGIN_TYPE_MUSIC, NullMusicPlugin);
|
2008-05-14 14:56:29 +00:00
|
|
|
//#else
|
2010-06-21 21:36:36 +00:00
|
|
|
REGISTER_PLUGIN_STATIC(AUTO, PLUGIN_TYPE_MUSIC, AutoMusicPlugin);
|
2008-06-13 14:30:47 +00:00
|
|
|
REGISTER_PLUGIN_STATIC(NULL, PLUGIN_TYPE_MUSIC, NullMusicPlugin);
|
2008-05-14 14:56:29 +00:00
|
|
|
//#endif
|