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 -1
View File
@@ -29,6 +29,7 @@
#include "common/Object.h"
#include "common/StringMap.h"
#include "common/int.h"
#include "FileData.h"
namespace love
{
@@ -93,7 +94,7 @@ public:
* @param size The number of bytes to attempt reading, or -1 for EOF.
* @return A newly allocated Data object.
**/
virtual Data *read(int64 size = ALL) = 0;
virtual FileData *read(int64 size = ALL) = 0;
/**
* Reads data into the destination buffer.
+1 -1
View File
@@ -111,7 +111,7 @@ int64 File::getSize()
}
Data *File::read(int64 size)
FileData *File::read(int64 size)
{
bool isOpen = (file != 0);
+1 -1
View File
@@ -69,7 +69,7 @@ public:
bool open(Mode mode);
bool close();
int64 getSize();
Data *read(int64 size = ALL);
FileData *read(int64 size = ALL);
int64 read(void *dst, int64 size);
bool write(const void *data, int64 size);
bool write(const Data *data, int64 size = ALL);