Beispiel #1
0
void setTimeDivision(const double division) {
  if(division <= 0) {
    logError("Ignoring attempt to set division to %f", division);
    return;
  }
  _getAudioSettings()->timeDivision = division;
}
Beispiel #2
0
void setTempo(const double tempo) {
  if(tempo <= 0.0f) {
    logError("Ignoring attempt to set tempo to %f", tempo);
    return;
  }
  logInfo("Setting tempo to %d", tempo);
  _getAudioSettings()->tempo = tempo;
}
Beispiel #3
0
void setSampleRate(const double sampleRate) {
  if(sampleRate <= 0.0f) {
    logError("Ignoring attempt to set sample rate to %f", sampleRate);
    return;
  }
  logInfo("Setting sample rate to %gHz", sampleRate);
  _getAudioSettings()->sampleRate = sampleRate;
}
Beispiel #4
0
void setNumChannels(const unsigned int numChannels) {
  if(numChannels <= 0) {
    logError("Ignoring attempt to set num channels to %d", numChannels);
    return;
  }
  logInfo("Setting %d channels", numChannels);
  _getAudioSettings()->numChannels = numChannels;
}
Beispiel #5
0
void setBlocksize(const unsigned long blocksize) {
  if(blocksize <= 0) {
    logError("Ignoring attempt to set invalid blocksize to %d", blocksize);
    return;
  }
  logInfo("Setting blocksize to %ld", blocksize);
  _getAudioSettings()->blocksize = blocksize;
}
Beispiel #6
0
boolByte setSampleRate(const SampleRate sampleRate) {
  if (sampleRate <= 0.0f) {
    logError("Can't set sample rate to %f", sampleRate);
    return false;
  }

  logInfo("Setting sample rate to %gHz", sampleRate);
  _getAudioSettings()->sampleRate = sampleRate;
  return true;
}
Beispiel #7
0
boolByte setNumChannels(const ChannelCount numChannels) {
  if (numChannels <= 0) {
    logError("Can't set channel count to %d", numChannels);
    return false;
  }

  logInfo("Setting %d channels", numChannels);
  _getAudioSettings()->numChannels = numChannels;
  return true;
}
Beispiel #8
0
boolByte setBlocksize(const SampleCount blocksize) {
  if (blocksize <= 0) {
    logError("Can't set invalid blocksize %d", blocksize);
    return false;
  }

  logInfo("Setting blocksize to %ld", blocksize);
  _getAudioSettings()->blocksize = blocksize;
  return true;
}
Beispiel #9
0
boolByte setTempo(const Tempo tempo) {
  if (tempo <= 0.0f) {
    logError("Cannot set tempo to %f", tempo);
    return false;
  }

  logInfo("Setting tempo to %d", tempo);
  _getAudioSettings()->tempo = tempo;
  return true;
}
Beispiel #10
0
void setTimeSignatureNoteValue(const short noteValue) {
  // Bit of an easter egg :)
  if(!(noteValue == 2 || noteValue == 4 || noteValue == 8 || noteValue == 16) || noteValue < 2 || noteValue > 16) {
    logInfo("Interesting time signature you've chosen. I'm sure this piece is going to sound great...");
  }
  if(noteValue <= 0) {
    logError("Ignoring attempt to set time signature denominator to %d", noteValue);
    return;
  }
  _getAudioSettings()->timeSignatureNoteValue = noteValue;
}
Beispiel #11
0
void setTimeSignatureBeatsPerMeasure(const short beatsPerMeasure) {
  // Bit of an easter egg :)
  if(beatsPerMeasure < 2 || beatsPerMeasure > 12) {
    logInfo("Freaky time signature, but whatever you say...");
  }
  if(beatsPerMeasure <= 0) {
    logError("Ignoring attempt to set time signature numerator to %d", beatsPerMeasure);
    return;
  }
  _getAudioSettings()->timeSignatureBeatsPerMeasure = beatsPerMeasure;
}
Beispiel #12
0
boolByte setBitDepth(const BitDepth bitDepth) {
  switch (bitDepth) {
  case kBitDepth8Bit:
  case kBitDepth16Bit:
  case kBitDepth24Bit:
  case kBitDepth32Bit:
    _getAudioSettings()->bitDepth = bitDepth;
    return true;

  default:
    logError("Invalid bit depth %d", bitDepth);
    return false;
  }
}
Beispiel #13
0
ChannelCount getNumChannels(void) { return _getAudioSettings()->numChannels; }
Beispiel #14
0
short getTimeSignatureNoteValue(void) {
  return _getAudioSettings()->timeSignatureNoteValue;
}
Beispiel #15
0
short getTimeSignatureBeatsPerMeasure(void) {
  return _getAudioSettings()->timeSignatureBeatsPerMeasure;
}
Beispiel #16
0
double getTempo(void) {
  return _getAudioSettings()->tempo;
}
Beispiel #17
0
double getTimeDivision(void) {
  return _getAudioSettings()->timeDivision;
}
Beispiel #18
0
unsigned long getBlocksize(void) {
  return _getAudioSettings()->blocksize;
}
Beispiel #19
0
unsigned int getNumChannels(void) {
  return _getAudioSettings()->numChannels;
}
Beispiel #20
0
double getSampleRate(void) {
  return _getAudioSettings()->sampleRate;
}
Beispiel #21
0
SampleCount getBlocksize(void) { return _getAudioSettings()->blocksize; }
Beispiel #22
0
BitDepth getBitDepth(void) { return _getAudioSettings()->bitDepth; }