Revert Bytes changes, prevents ppremature GC on audio decoding

This commit is contained in:
Joshua Granick
2016-12-19 19:50:56 -08:00
parent 1283ad44f2
commit ad339aa827
28 changed files with 451 additions and 302 deletions

View File

@@ -43,7 +43,7 @@ namespace lime {
int bitsPerSample;
int channels;
int sampleRate;
ArrayBufferView data;
ArrayBufferView *data;
private:

View File

@@ -18,7 +18,7 @@ namespace lime {
Image (value image);
~Image ();
ImageBuffer buffer;
ImageBuffer *buffer;
int height;
int offsetX;
int offsetY;

View File

@@ -21,12 +21,11 @@ namespace lime {
void Blit (const unsigned char *data, int x, int y, int width, int height);
void Resize (int width, int height, int bitsPerPixel = 32);
void Set (value imageBuffer);
int Stride ();
value Value ();
int bitsPerPixel;
ArrayBufferView data;
ArrayBufferView *data;
PixelFormat format;
int height;
bool premultiplied;

View File

@@ -19,7 +19,6 @@ namespace lime {
ArrayBufferView (value arrayBufferView);
~ArrayBufferView ();
void Clear ();
unsigned char *Data ();
const unsigned char *Data () const;
int Length () const;
@@ -28,7 +27,7 @@ namespace lime {
void Set (const QuickVec<unsigned char> data);
value Value ();
Bytes buffer;
Bytes *buffer;
int byteLength;
int length;

View File

@@ -9,10 +9,7 @@
namespace lime {
class Bytes {
public:
struct Bytes {
Bytes ();
@@ -22,7 +19,6 @@ namespace lime {
Bytes (const QuickVec<unsigned char> data);
~Bytes ();
void Clear ();
unsigned char *Data ();
const unsigned char *Data () const;
int Length () const;
@@ -34,6 +30,7 @@ namespace lime {
unsigned char *_data;
int _length;
AutoGCRoot *_root;
value _value;