Rework internal module registration to happen in constructors.

This commit is contained in:
Sasha Szpakowski
2024-02-24 15:21:38 -04:00
parent c7e4dafd88
commit 1e97e09b28
73 changed files with 154 additions and 248 deletions
+2 -6
View File
@@ -106,7 +106,8 @@ static const char *getDeviceSpecifier(ALCdevice *device)
}
Audio::Audio()
: device(nullptr)
: love::audio::Audio("love.audio.openal")
, device(nullptr)
, context(nullptr)
, pool(nullptr)
, poolThread(nullptr)
@@ -256,11 +257,6 @@ Audio::~Audio()
alcCloseDevice(device);
}
const char *Audio::getName() const
{
return "love.audio.openal";
}
love::audio::Source *Audio::newSource(love::sound::Decoder *decoder)
{
return new Source(pool, decoder);
-3
View File
@@ -78,9 +78,6 @@ public:
**/
static ALenum getFormat(int bitDepth, int channels);
// Implements Module.
const char *getName() const;
// Implements Audio.
love::audio::Source *newSource(love::sound::Decoder *decoder);
love::audio::Source *newSource(love::sound::SoundData *soundData);