Re: linear PCM
Re: linear PCM
- Subject: Re: linear PCM
- From: "tahome izwah" <email@hidden>
- Date: Wed, 16 Jan 2008 10:27:24 +0100
You have to take dt into account when calculating the samples from
your trig function. In the PCM domain your samples are always spaced
at a uniform and time normalized step size of unity. IOW, sin() has no
way of knowing your dt if you don't include it when calculating the
argument.
HTH,
--th
2008/1/15, Roland Silver <email@hidden>:
> I proposed:
> signal(t) = sin(2*pi*f*t), where t = 0, dt, 2*dt, 3*dt ...
> where dt = 1/sampleRate.
>
> In what way does that fail "to actually calculate [the] samples spaced
> 1/sampleRate apart"?
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Mon, 14 Jan 2008 21:25:49 +0100
> > From: "tahome izwah" <email@hidden>
> > Subject: Re: linear PCM
> > To: "Core Audio" <email@hidden>
> >
> > No, it does not, for the exact reason that you have stated - you need
> > to actually calculate your samples spaced 1/sampleRate apart.
> >
> > So your sampled sine becomes: signal[t] = sin(2.*pi*f*t/sampleRate);
> >
> > HTH
> > --th
> >
> > 2008/1/14, Roland Silver <email@hidden>:
> >> Brian,
> >> Thanks for your help with my questions about Audio Queue.
> >>
> >> I'm puzzled by your last comment: "However, you should note that
> >> (2*pi*f*t) does not account for sampling rate. You'll need to modify
> >> that parameter if you want frequency f to be accurate when the
> >> samples
> >> are played back."
> >>
> >> In my example, I compute the successive values of sin(2*pi*f*t) for
> >> successive values of t which are 1/samplingRate apart. Does that not
> >> account for sampling rate?
> >>
> >> --RS
> >>
> >> Roland Silver
> >> 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