• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Data Types for Extracting samples from Audio Buffer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Data Types for Extracting samples from Audio Buffer (From: Joseph Ayers <email@hidden>)

  • Prev by Date: Re: Create CGImageRef with transparency
  • Next by Date: Re: Data Types for Extracting samples from Audio Buffer
  • Previous by thread: Data Types for Extracting samples from Audio Buffer
  • Next by thread: Re: Data Types for Extracting samples from Audio Buffer
  • Index(es):
    • Date
    • Thread