src/pitch/pitch.c: add aliases for freq (hertz, Hz, and f0)
authorPaul Brossier <piem@piem.org>
Sat, 7 Dec 2013 19:55:37 +0000 (14:55 -0500)
committerPaul Brossier <piem@piem.org>
Sat, 7 Dec 2013 19:55:37 +0000 (14:55 -0500)
src/pitch/pitch.c

index 430fed1..7247ae2 100644 (file)
@@ -236,6 +236,12 @@ aubio_pitch_set_unit (aubio_pitch_t * p, char_t * pitch_unit)
   aubio_pitch_mode pitch_mode;
   if (strcmp (pitch_unit, "freq") == 0)
     pitch_mode = aubio_pitchm_freq;
   aubio_pitch_mode pitch_mode;
   if (strcmp (pitch_unit, "freq") == 0)
     pitch_mode = aubio_pitchm_freq;
+  else if (strcmp (pitch_unit, "hertz") == 0)
+    pitch_mode = aubio_pitchm_freq;
+  else if (strcmp (pitch_unit, "Hz") == 0)
+    pitch_mode = aubio_pitchm_freq;
+  else if (strcmp (pitch_unit, "f0") == 0)
+    pitch_mode = aubio_pitchm_freq;
   else if (strcmp (pitch_unit, "midi") == 0)
     pitch_mode = aubio_pitchm_midi;
   else if (strcmp (pitch_unit, "cent") == 0)
   else if (strcmp (pitch_unit, "midi") == 0)
     pitch_mode = aubio_pitchm_midi;
   else if (strcmp (pitch_unit, "cent") == 0)