/thirdparty/liblastfm2/src/fingerprint/fplib/Filter.h

http://github.com/tomahawk-player/tomahawk · C Header · 47 lines · 19 code · 7 blank · 21 comment · 0 complexity · 0666a7ee661a2e89b9edd3d266570908 MD5 · raw file

  1. /*
  2. Copyright 2005-2009 Last.fm Ltd. <mir@last.fm>
  3. This file is part of liblastfm.
  4. liblastfm is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. liblastfm is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with liblastfm. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. #ifndef __FILTER_H
  16. #define __FILTER_H
  17. namespace fingerprint
  18. {
  19. struct Filter
  20. {
  21. /// Constructs a new filter with id.
  22. Filter(unsigned int id, float threshold, float weight);
  23. unsigned int id; //< filter id
  24. unsigned int wt; //< time width
  25. unsigned int first_band; //< first band
  26. unsigned int wb; //< band width
  27. unsigned int filter_type; //< filter type
  28. float threshold; //< threshold for filter
  29. float weight; //< filter weight
  30. // number of frames in time
  31. static const unsigned int KEYWIDTH = 100;
  32. // number of bands to divide the signal (log step)
  33. static const unsigned int NBANDS = 33;
  34. };
  35. }
  36. #endif // __FILTER_H