Skip to content

Commit

Permalink
soundfile: add quality settings to resampler
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Jan 4, 2025
1 parent 1208a73 commit e577c8a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ InspectorWidget::InspectorWidget(
m_tempo.setRange(1., 600.);
m_mode.addItems(
{tr("Raw"), tr("Timestretch"), tr("Timestretch (percussive)"),
tr("HQ Timestretch"), tr("HQ Timestretch (percussive)"), tr("Repitch")});
tr("HQ Timestretch"), tr("HQ Timestretch (percussive)"),
tr("Repitch (high quality)"), tr("Repitch (medium quality)"),
tr("Repitch (fastest)")});

setObjectName("SoundInspectorWidget");

Expand Down Expand Up @@ -63,6 +65,12 @@ InspectorWidget::InspectorWidget(
case ossia::audio_stretch_mode::Repitch:
idx = 5;
break;
case ossia::audio_stretch_mode::RepitchMediumQ:
idx = 6;
break;
case ossia::audio_stretch_mode::RepitchFastestQ:
idx = 7;
break;
}

if(m_mode.currentIndex() != idx)
Expand Down Expand Up @@ -111,6 +119,12 @@ InspectorWidget::InspectorWidget(
case 5:
m = ossia::audio_stretch_mode::Repitch;
break;
case 6:
m = ossia::audio_stretch_mode::RepitchMediumQ;
break;
case 7:
m = ossia::audio_stretch_mode::RepitchFastestQ;
break;
}

if(m != process().stretchMode())
Expand Down

0 comments on commit e577c8a

Please sign in to comment.