|
From: Tapio V. <aa...@us...> - 2011-01-20 14:08:53
|
Module: editor
Branch: master
Commit: f824b2f837ec1b863843d5e40c2cca10a9ec4a3f
Author: Tapio Vierros <tap...@gm...>
Date: Thu Jan 20 15:39:48 2011 +0200
Messagebox for audio errors.
---
editorapp.cc | 5 +++++
notegraphwidget.cc | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/editorapp.cc b/editorapp.cc
index dc4f6f8..8d496f2 100644
--- a/editorapp.cc
+++ b/editorapp.cc
@@ -512,6 +512,11 @@ void EditorApp::playerStateChanged(Phonon::State newstate, Phonon::State oldstat
(void)oldstate;
if (newstate != Phonon::PlayingState) {
noteGraph->stopMusic();
+ if (newstate == Phonon::ErrorState) {
+ QString errst(tr("Error playing audio!"));
+ if (player) errst += " " + player->errorString();
+ QMessageBox::critical(this, tr("Playback error"), errst);
+ }
}
}
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 3314729..7fece07 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -115,7 +115,7 @@ void NoteGraphWidget::finalizeNewLyrics()
void NoteGraphWidget::analyzeMusic(QString filepath)
{
m_pitch.reset(new PitchVis(filepath, this));
- m_analyzeTimer = startTimer(1000);
+ m_analyzeTimer = startTimer(2000);
}
void NoteGraphWidget::timerEvent(QTimerEvent *event)
|