• 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
Loading arrays into register
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Loading arrays into register


  • Subject: Loading arrays into register
  • From: "Simon" <email@hidden>
  • Date: Thu, 27 Dec 2007 19:26:31 -0500 (EST)

Hi, hope everyone's been enjoying the holidays.

Anyway, I've been working on a Cocoa application that uses a simple Core Audio oscillator that I got from some sample code to play sound. I'm sending data to the oscillator in an array to generate sine waves, but I can't work out the syntax for how to do it.

Here's some of the code to show what I mean:

sinewavedef*	def = defptr; // get access to Sinewave's data
    int i;
    // load instance variables into registers
    double phase = def->phase;
    double amp = def->amp;
    double pan = def->pan;
    double freq = def->freq;
	NSArray * xArray = def->xArray;
	NSArray * xArrayz = def->xArrayz;

	double testArray[100][2] = def->testArray[100][2];

I seem to have no problem with NSArrays (though NMutableArray won't work), but I need to change the data in the arrays, so these are no good. I've tried all the variations of the last line I can think of, including the indeces or not including them, etc. And I can't find anything about it on the internet. I'm still pretty new to programming, so there's probably something really obvious I'm missing.

Can anyone help?

Hopefully, Simon

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Loading arrays into register
      • From: Brian Willoughby <email@hidden>
  • Prev by Date: Re: old mtcoreaudio code doesn't work now
  • Next by Date: Re: Loading arrays into register
  • Previous by thread: AUAudioFilePlayer
  • Next by thread: Re: Loading arrays into register
  • Index(es):
    • Date
    • Thread