Okay, I got everything working using the NSData objects. I'll try encoding the
bytes again with the unint8_t* cast. I don't know why I didn't try that... I'm
really not very comfortable when it gets down to this low-level stuff. I'm a
musician, and my programming experience came from MaxMSP, to
On Dec 1, 2009, at 12:03 PM, James Maxwell wrote:
erm... actually, just using:
[aCoder encodeBytes:coincidences length:coincsSize
forKey:@"coincidences"];
fails with a complaint about getting a float* when it expects a
uint8_t const.
In fact, I know remember that's why I used the NSData
James Maxwell wrote:
erm... actually, just using:
[aCoder encodeBytes:coincidences length:coincsSize
forKey:@"coincidences"];
fails with a complaint about getting a float* when it expects a
uint8_t const.
In fact, I know remember that's why I used the NSData in the first
place... any th
On Dec 1, 2009, at 12:03, James Maxwell wrote:
> [aCoder encodeBytes:coincidences length:coincsSize forKey:@"coincidences"];
>
> fails with a complaint about getting a float* when it expects a uint8_t
> const.
> In fact, I know remember that's why I used the NSData in the first place...
> any
>
> As far as the NSData goes, I'm glad you pointed the redundancy of it out.
> I'll just encode the bytes themselves.
>
erm... actually, just using:
[aCoder encodeBytes:coincidences length:coincsSize forKey:@"coincidences"];
fails with a complaint about getting a float* when it expects a ui
Wow! I'd forgotten how helpful this list is - and how quickly!
Everyone pointing out my use of &coincidences is obviously right. I figured it
out soon after getting my first reply. I already made an @property accessor for
coincidences, so I just used that and the crashes went away.
As far as t
On Tue, Dec 1, 2009 at 1:47 PM, James Maxwell
wrote:
> I'm trying to save the state of my app. It chews up a lot of memory, most of
> which is in large float* matrices. I'm getting an EXC_BAD_ACCESS error in
> -encodeBytes:length:forKey: and I'm just wondering what might be happening.
> The flo
James Maxwell wrote:
NSUInteger coincsSize = maxCoincs * inputSize * sizeof(float);
NSData* coincData = [NSData dataWithBytesNoCopy:&coincidences
length:coincsSize];
[aCoder encodeBytes:[coincData bytes] length:coincsSize
forKey:@"coincidences"];
It makes no sense to go through an NSData o
On Dec 1, 2009, at 10:47, James Maxwell wrote:
> I'm trying to save the state of my app. It chews up a lot of memory, most of
> which is in large float* matrices. I'm getting an EXC_BAD_ACCESS error in
> -encodeBytes:length:forKey: and I'm just wondering what might be happening.
> The float* "c
On Dec 1, 2009, at 11:47 AM, James Maxwell wrote:
> NSUInteger coincsSize = maxCoincs * inputSize * sizeof(float);
> NSData* coincData = [NSData dataWithBytesNoCopy:&coincidences
> length:coincsSize];
> [aCoder encodeBytes:[coincData bytes] length:coincsSize
> forKey:@"coincidences"];
>
> The
I'm trying to save the state of my app. It chews up a lot of memory, most of
which is in large float* matrices. I'm getting an EXC_BAD_ACCESS error in
-encodeBytes:length:forKey: and I'm just wondering what might be happening. The
float* "coincidences" is a malloced array.
NSUInteger coincsSize
11 matches
Mail list logo