• 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: Newbie: trying to log samples
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: trying to log samples


  • Subject: Re: Newbie: trying to log samples
  • From: Michael Hanna <email@hidden>
  • Date: Thu, 3 Feb 2005 13:49:04 -0500

aha! Silly me! :) thanks for pointing that out.

Michael

On 3-Feb-05, at 1:47 PM, kelly jacklin wrote:

On Feb 3, 2005, at 10:24 AM, Michael Hanna wrote:

Or if I printout the first 256 samples, I get 64 significant numbers and the rest zeroes. Why are there missing samples and why this 4:1 ratio of significant data to none?

The problem is because of:

<x-tad-smaller>#define SOUND_PRINTOUT_SIZE (2 * 128)</x-tad-smaller><x-tad-smaller>
</x-tad-smaller>

and:

<x-tad-smaller> memcpy (aSample, buffer->mData, SOUND_PRINTOUT_SIZE); </x-tad-smaller><x-tad-smaller>// grab 128 frames, 256 words</x-tad-smaller><x-tad-smaller>
</x-tad-smaller>

Your memcpy is only copying SOUND_PRINTOUT_SIZE _bytes_, whereas you seem to be expecting the buffer to contain SOUND_PRINTOUT_SIZE samples of data after the memcpy (since you are looping over the samples for that number of times)...

Does that help?

kelly

_______________________________________________
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
References: 
 >Newbie: trying to log samples (From: Michael Hanna <email@hidden>)
 >Re: Newbie: trying to log samples (From: Michael Thornburgh <email@hidden>)
 >Re: Newbie: trying to log samples (From: Michael Hanna <email@hidden>)
 >Re: Newbie: trying to log samples (From: kelly jacklin <email@hidden>)

  • Prev by Date: Re: Newbie: trying to log samples
  • Next by Date: Re: problems compiling SDK PublicUtility classes
  • Previous by thread: Re: Newbie: trying to log samples
  • Next by thread: Re: Newbie: trying to log samples
  • Index(es):
    • Date
    • Thread