Re: Data Types for Extracting samples from Audio Buffer
Re: Data Types for Extracting samples from Audio Buffer
- Subject: Re: Data Types for Extracting samples from Audio Buffer
- From: Nick Zitzmann <email@hidden>
- Date: Sun, 5 Oct 2008 12:29:58 -0600
On Oct 5, 2008, at 10:47 AM, Joseph Ayers wrote:
The program crashes on the line
[ipsamp initWithUnsignedShort:(unsigned short)ippointer[isamp]];
with
Program received signal: “EXC_BAD_ACCESS”.
isamp is 1.
Am I using the wrong data types?
No; you're forgetting to allocate the memory first. You need to
allocate memory using -alloc or -allocWithZone: before calling -init,
or use a convenience class method such as +[NSNumber
numberWithUnsignedShort:].
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden