<commit_before>#include <stdio.h>

#include "hardware.h"
#include "fm.h"
#include "mfm.h"
#include "gcr.h"
#include "mod.h"

int mod_debug=0;

unsigned long mod_hist[MOD_HISTOGRAMSIZE];
int mod_peak[MOD_PEAKSIZE];
int mod_peaks;
char mod_density=MOD_DENSITYAUTO;

float mod_samplestoms(const long samples)
{
  return ((float)1/(((float)hw_samplerate)/(float)MICROSECONDSINSECOND))*(float)samples;
}

long mod_mstosamples(const float ms)
{
  return (ms/((float)1/(((float)hw_samplerate)/(float)MICROSECONDSINSECOND)));
}

void mod_buildhistogram(const unsigned char *sampledata, const unsigned long samplesize)
{
  int j;
  char level,bi=0;
  unsigned char c;
  int count;
  unsigned long datapos;

  if (mod_debug)
    fprintf(stderr, "Creating histogram for track %d data sampled at %lu\n", hw_currenttrack, hw_samplerate);

  // Clear histogram
  for (j=0; j<MOD_HISTOGRAMSIZE; j++) mod_hist[j]=0;<commit_msg>Add hardware RPM to histogram debug<commit_after>#include <stdio.h>

#include "hardware.h"
#include "fm.h"
#include "mfm.h"
#include "gcr.h"
#include "mod.h"

int mod_debug=0;

unsigned long mod_hist[MOD_HISTOGRAMSIZE];
int mod_peak[MOD_PEAKSIZE];
int mod_peaks;
char mod_density=MOD_DENSITYAUTO;

float mod_samplestoms(const long samples)
{
  return ((float)1/(((float)hw_samplerate)/(float)MICROSECONDSINSECOND))*(float)samples;
}

long mod_mstosamples(const float ms)
{
  return (ms/((float)1/(((float)hw_samplerate)/(float)MICROSECONDSINSECOND)));
}

void mod_buildhistogram(const unsigned char *sampledata, const unsigned long samplesize)
{
  int j;
  char level,bi=0;
  unsigned char c;
  int count;
  unsigned long datapos;

  if (mod_debug)
    fprintf(stderr, "Creating histogram for track %d data sampled at %lu with %.2f rpm\n", hw_currenttrack, hw_samplerate, hw_rpm);

  // Clear histogram
  for (j=0; j<MOD_HISTOGRAMSIZE; j++) mod_hist[j]=0;
{'fraction_non_alphanumeric': 0.13129689174705253, 'fraction_numerical': 0.006966773847802787, 'mean_word_length': 5.992509363295881, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4499093', 'n_tokens_mistral': 739, 'n_tokens_neox': 714, 'n_words': 162}