<commit_before>/*********************************************************/
/* Bela Csound Main Program                              */
/* takes the option --csd=name                           */
/*                                                       */
/*********************************************************/
#include <Bela.h>
#include <csound/csound.hpp>
#include <unistd.h>

struct csData{
  Csound *csound;
  int blocksize;
  int res;
  int count;
  const char* csd;
};

int main(int argc, const char *argv[]) {
  csData CsData;
  const option opt = {"csd", required_argument, &(CsData.csd), 0};
  BelaInitSettings settings;
  Bela_defaultSettings(&settings);
  if(Bela_getopt_long(argc, argv, "", &opt, &settings) == 0) {
    bool res = Bela_initAudio(&settings, &CsData);
    if(res){
       Bela_startAudio();
       while(CsData.res == 0) sleep(1);
       Bela_stopAudio();
    }
    Bela_cleanupAudio();
    return 0;
  }
  fprintf(stderr, "no csd provided \n");
  return -1;
}<commit_msg>argument selection<commit_after>/*********************************************************/
/* Bela Csound Main Program                              */
/* takes the option --csd=name                           */
/*                                                       */
/*********************************************************/
#include <Bela.h>
#include <csound/csound.hpp>
#include <unistd.h>
#include <cstring>

struct csData{
  Csound *csound;
  int blocksize;
  int res;
  int count;
  const char* csd;
};

int main(int argc, const char *argv[]) {
  csData CsData;
  const option opt[] = {{"csd", required_argument, NULL, 0},
			{NULL, 0, NULL, 0}};
  BelaInitSettings settings;
  Bela_defaultSettings(&settings);
  if(Bela_getopt_long(argc, argv, "", opt, &settings) == 0) {
    csData.csd = new char[strlen(optarg)+1];
    std::strcpy(csData.csd,optarg);
    bool res = Bela_initAudio(&settings, &CsData);
    if(res){
       Bela_startAudio();
       while(CsData.res == 0) sleep(1);
       Bela_stopAudio();
    }
    Bela_cleanupAudio();
    return 0;
  }
  fprintf(stderr, "no csd provided \n");
  return -1;
}
{'fraction_non_alphanumeric': 0.23637218045112782, 'fraction_numerical': 0.007048872180451127, 'mean_word_length': 2.5661641541038525, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4757397', 'n_tokens_mistral': 674, 'n_tokens_neox': 651, 'n_words': 153}