In Reply to: Re: Hi Ted. posted by jneutron on August 23, 2003 at 07:02:30:
HowdyHave you read all of my responses on this thread?
You don't have to wait for the peak. Look at the waveform that Cool Edit Pro displayed. The program had no idea what I gave it. Here's what I gave it:
#include#define _USE_MATH_DEFINES
#includeint main () {
const double sr = 44100;
const double sp = 1/sr;
FILE * h = fopen("out.pcm", "w");
for (double t = 0; t < 1; t += sp) {
double a = sin(t * (M_PI * 2) * (sr / (44000.0l/14000)));
short s = int(a * 32767);
fwrite(&s, 2, 1, h); }
fclose(h); }Cool Edit Pro (and your DAC) have no idea what waveform I gave, but the peak is reconstructed accurately from the samples present.
Anyway go listen to your 14kHz sampled and reconstructed at 32k, 44.1k, 48k, 96k, etc. They all sound the same to my ears and have the same amplitude. It also agrees with theory. Why would I believe yours eyes instead of mine and my ears and the theory?
-Ted
This post is made possible by the generous support of people like you and our sponsors:
Follow Ups
- Re: Hi Ted. - Ted Smith 07:24:03 08/23/03 (11)
- Code correction - Ted Smith 19:22:23 08/23/03 (0)
- Re: Hi Ted. what you do??edit a typo? - jneutron 07:44:47 08/23/03 (9)
- Re: Hi Ted. what you do??edit a typo? - Ted Smith 08:09:33 08/23/03 (8)
- Re: Hi Ted. what you do??edit a typo? - jneutron 09:13:54 08/23/03 (7)
- Re: Hi Ted. what you do??edit a typo? - Ted Smith 09:41:40 08/23/03 (6)
- Re: Hi Ted. what you do??edit a typo? - jneutron 10:28:39 08/23/03 (5)
- Re: Hi Ted. what you do??edit a typo? - Ted Smith 11:25:20 08/23/03 (4)
- What's confusing to most people about this - Commuteman 17:37:13 08/23/03 (2)
- Re: What's confusing to most people about this - Ted Smith 19:13:42 08/23/03 (1)
- Re: What's confusing to most people about this - jneutron 07:47:01 08/25/03 (0)
- Re: Hi Ted. what you do??edit a typo? - john curl 13:20:02 08/23/03 (0)