]> git.sesse.net Git - pitch/blobdiff - pitch.cpp
Make sure we actually set the sample rate to whatever the #define is.
[pitch] / pitch.cpp
index 92c7b085cf026ce6a9aa9a2f5ff070bb875e7115..658066b0edcf1911f08f253ad5a462c10e8fd873 100644 (file)
--- a/pitch.cpp
+++ b/pitch.cpp
@@ -20,7 +20,7 @@
 #define EQUAL_TEMPERAMENT     0
 #define WELL_TEMPERED_GUITAR  1
 
 #define EQUAL_TEMPERAMENT     0
 #define WELL_TEMPERED_GUITAR  1
 
-#define TUNING EQUAL_TEMPERAMENT
+#define TUNING WELL_TEMPERED_GUITAR
 
 int get_dsp_fd();
 void read_chunk(int fd, double *in, unsigned num_samples);
 
 int get_dsp_fd();
 void read_chunk(int fd, double *in, unsigned num_samples);
@@ -87,7 +87,7 @@ int get_dsp_fd()
        int chan = 1;
        ioctl(fd, SOUND_PCM_WRITE_CHANNELS, &chan);
        
        int chan = 1;
        ioctl(fd, SOUND_PCM_WRITE_CHANNELS, &chan);
        
-       int rate = 22050;
+       int rate = SAMPLE_RATE;
        ioctl(fd, SOUND_PCM_WRITE_RATE, &rate);
 
        ioctl(3, SNDCTL_DSP_SYNC, 0);
        ioctl(fd, SOUND_PCM_WRITE_RATE, &rate);
 
        ioctl(3, SNDCTL_DSP_SYNC, 0);