mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Make love.sound.newDecoder accept FileData, and make File->read return FileData
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -111,7 +111,7 @@ int64 File::getSize()
|
||||
}
|
||||
|
||||
|
||||
Data *File::read(int64 size)
|
||||
FileData *File::read(int64 size)
|
||||
{
|
||||
bool isOpen = (file != 0);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user