Make love.sound.newDecoder accept FileData, and make File->read return FileData

This commit is contained in:
Bart van Strien
2012-10-14 17:19:40 +02:00
parent e6711b2837
commit 33d7115887
7 changed files with 26 additions and 15 deletions
+2 -5
View File
@@ -51,10 +51,9 @@ const char *Sound::getName() const
return "love.sound.lullaby";
}
sound::Decoder *Sound::newDecoder(love::filesystem::File *file, int bufferSize)
sound::Decoder *Sound::newDecoder(love::filesystem::FileData *data, int bufferSize)
{
Data *data = file->read();
std::string ext = file->getExtension();
std::string ext = data->getExtension();
sound::Decoder *decoder = 0;
@@ -76,8 +75,6 @@ sound::Decoder *Sound::newDecoder(love::filesystem::File *file, int bufferSize)
// else if (OtherDecoder::accept(ext))
data->release();
return decoder;
}