forked from mia/Aegisub
Fix #450 point 4, playback of drag-retimed karaoke syllables now stops at the right position instead of at the end of line.
Originally committed to SVN as r1382.
This commit is contained in:
parent
6d55d1fa11
commit
9043bdecf8
1 changed files with 7 additions and 2 deletions
|
@ -802,7 +802,7 @@ void AudioDisplay::SetScale(float _scale) {
|
||||||
//////////////////
|
//////////////////
|
||||||
// Load from file
|
// Load from file
|
||||||
void AudioDisplay::SetFile(wxString file) {
|
void AudioDisplay::SetFile(wxString file) {
|
||||||
wxLogDebug(_T("AudioDisplay::SetFile(file=%s, vproviderLOL=%p)"), file.c_str());
|
wxLogDebug(_T("AudioDisplay::SetFile(file=%s)"), file.c_str());
|
||||||
// Unload
|
// Unload
|
||||||
if (file.IsEmpty()) {
|
if (file.IsEmpty()) {
|
||||||
wxLogDebug(_T("AudioDisplay::SetFile: file is empty, just closing audio"));
|
wxLogDebug(_T("AudioDisplay::SetFile: file is empty, just closing audio"));
|
||||||
|
@ -1611,7 +1611,12 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) {
|
||||||
// Update stuff
|
// Update stuff
|
||||||
if (updated) {
|
if (updated) {
|
||||||
if (diagUpdated) NeedCommit = true;
|
if (diagUpdated) NeedCommit = true;
|
||||||
|
if (karaoke->enabled) {
|
||||||
|
AudioKaraokeSyllable &syl = karaoke->syllables[karaoke->curSyllable];
|
||||||
|
player->SetEndPosition(GetSampleAtMS(curStartMS + (syl.start_time+syl.duration)*10));
|
||||||
|
} else {
|
||||||
player->SetEndPosition(GetSampleAtX(selEnd));
|
player->SetEndPosition(GetSampleAtX(selEnd));
|
||||||
|
}
|
||||||
if (hold != 0) {
|
if (hold != 0) {
|
||||||
wxCursor cursor(wxCURSOR_SIZEWE);
|
wxCursor cursor(wxCURSOR_SIZEWE);
|
||||||
SetCursor(cursor);
|
SetCursor(cursor);
|
||||||
|
|
Loading…
Reference in a new issue