1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-09 13:12:17 +01:00

Improve error message when capture stream fails

Rather than just guessing at the cause of the error, include the actual
error string from PortAudio.
This commit is contained in:
Steve Daulton
2018-08-12 16:12:22 +01:00
parent 90286acb6a
commit 1d22ca5789
3 changed files with 12 additions and 4 deletions

View File

@@ -876,7 +876,7 @@ void ControlToolBar::StopPlaying(bool stopStream /* = true*/)
if( meter ) {
meter->Clear();
}
meter = project->GetCaptureMeter();
if( meter ) {
meter->Clear();
@@ -1312,9 +1312,8 @@ bool ControlToolBar::DoRecord(AudacityProject &project,
CancelRecording();
// Show error message if stream could not be opened
ShowErrorDialog(this, _("Error"),
_("Error opening sound device.\nTry changing the audio host, recording device and the project sample rate."),
wxT("Error_opening_sound_device"));
wxString msg = wxString::Format(_("Error opening recording device.\nError code: %s"), gAudioIO->LastPaErrorString());
ShowErrorDialog(this, _("Error"), msg, wxT("Error_opening_sound_device"));
}
}