Example #1
0
void gdEditor::__cb_reload()
{
  if (!gdConfirmWin("Warning", "Reload sample: are you sure?"))
    return;

  /* no need for glue_loadChan, there's no gui to refresh */

  ch->load(ch->wave->pathfile.c_str(), G_Conf.samplerate, G_Conf.rsmpQuality);

  glue_setBoost(this, ch, DEFAULT_BOOST, true);
  glue_setPitch(this, ch, gDEFAULT_PITCH, true);
  glue_setPanning(this, ch, 1.0f);
  pan->value(1.0f);  // glue_setPanning doesn't do it
  pan->redraw();     // glue_setPanning doesn't do it

  waveTools->waveform->stretchToWindow();
  waveTools->updateWaveform();

  glue_setBeginEndChannel(this, ch, 0, ch->wave->size, true);

  redraw();
}
Example #2
0
void gdEditor::__cb_reload() {

	if (!gdConfirmWin("Warning", "Reload sample: are you sure?"))
		return;

	/* no need for glue_loadChan, there's no gui to refresh */

	mh_loadChan(G_Mixer.chan[chan]->pathfile.c_str(), chan);

	glue_setBoost(this, chan, DEFAULT_BOOST, true);
	glue_setPitch(this, chan, gDEFAULT_PITCH, true);
	glue_setPanning(this, chan, 1.0f);
	pan->value(1.0f);  // glue_setPanning doesn't do it
	pan->redraw();     // glue_setPanning doesn't do it

	wt->wave->calcZoom();
	wt->wave->alloc();
	wt->wave->redraw();

	glue_setBeginEndChannel(this, chan, 0, G_Mixer.chan[chan]->size, true);

	redraw();
}
Example #3
0
void gdEditor::__cb_setPitchDouble()
{
  glue_setPitch(this, ch, pitch->value()*2, true);
}
Example #4
0
void gdEditor::__cb_setPitchHalf()
{
  glue_setPitch(this, ch, pitch->value()/2, true);
}
Example #5
0
void gdEditor::__cb_setPitchNum()
{
  glue_setPitch(this, ch, atof(pitchNum->value()), true);
}
Example #6
0
void gdEditor::__cb_setPitch()
{
  glue_setPitch(this, ch, pitch->value(), false);
}
Example #7
0
void gdEditor::__cb_resetPitch()
{
  glue_setPitch(this, ch, 1.0f, true);
}
Example #8
0
void gdEditor::__cb_setPitchToSong()
{
  glue_setPitch(this, ch, ch->end/(float)G_Mixer.totalFrames, true);
}
Example #9
0
void gdEditor::__cb_setPitchToBar()
{
  glue_setPitch(this, ch, ch->end/(float)G_Mixer.framesPerBar, true);
}