• 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: A number of simple questions (still a few unanswered)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A number of simple questions (still a few unanswered)


  • Subject: Re: A number of simple questions (still a few unanswered)
  • From: James McCartney <email@hidden>
  • Date: Thu, 07 Feb 2013 10:45:59 -0800

Also useful for expressing durations across a sample rate conversion.

On Feb 6, 2013, at 4:50 PM, Jeff Moore <email@hidden> wrote:

> Fractional sample times are very useful for doing synchronization calculations. They are useful for dealing with durations that are not an integral number of samples, like the wavelength of a 440hz sine wave playing on a 44100 device.
>
> --
>
> Jeff Moore
> Core Audio
> Apple
>
>
>
> On Feb 6, 2013, at 4:44 PM, Seth Willits <email@hidden> wrote:
>
>> On Feb 6, 2013, at 4:12 PM, René J.V. Bertin wrote:
>>
>>>>>> - Why is AudioTimeStamp.mSampleTime a float if it's an integer number of samples?
>>>>
>>>> Still curious why it's a Float64 in the first place. :)
>>>
>>> Who says there's an integer number of samples in a second, and not in say, 3 seconds? And how else would you represent the sample duration for a rate of, say, 17 samples per second?
>>
>>
>> Forgive me since it's already been a few months since I was knee deep in Core Audio, but …
>>
>>
>> That's what mSampleRate is for not, mSampleTime.  mSampleTime is the "n"  in "the nth sample."
>>
>>
>> For example:
>>
>> memset(&timeStamp, 0, sizeof(timestamp));
>> timestamp.mSampleTime = 0;
>> timestamp.mFlags = kAudioTimeStampSampleTimeValid;
>>
>> for (int sampleIndex = 0; sampleIndex < 44100; sampleIndex += 512) {
>> 	...
>> 	timestamp.mSampleTime = (Float64)sampleIndex;
>> 	AudioUnitRender(outputUnit, &actionFlags, &timestamp, 0, 512, audioBufferList);
>> 	...
>> }
>>
>>
>> AFAICT it's always an integer value.
>>
>>
>> --
>> Seth Willits
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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

James McCartney
Apple CoreAudio
email@hidden




 _______________________________________________
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: 
 >Re: A number of simple questions (still a few unanswered) (From: James McCartney <email@hidden>)
 >Re: A number of simple questions (still a few unanswered) (From: Paul Davis <email@hidden>)
 >Re: A number of simple questions (still a few unanswered) (From: Seth Willits <email@hidden>)
 >Re: A number of simple questions (still a few unanswered) (From: "René J.V. Bertin" <email@hidden>)
 >Re: A number of simple questions (still a few unanswered) (From: Seth Willits <email@hidden>)
 >Re: A number of simple questions (still a few unanswered) (From: Jeff Moore <email@hidden>)

  • Prev by Date: Re: AudioServerPlugin for Lion?
  • Next by Date: Re: iOS: AUReverb2 and room types
  • Previous by thread: Re: A number of simple questions (still a few unanswered)
  • Next by thread: iOS: AUReverb2 and room types
  • Index(es):
    • Date
    • Thread