Fixes to audio and typesetting

Originally committed to SVN as r783.
This commit is contained in:
Rodrigo Braz Monteiro 2007-01-13 06:17:14 +00:00
parent 73ae14e548
commit c4233199c5
2 changed files with 5 additions and 2 deletions

View file

@ -1256,6 +1256,7 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) {
int start = karaoke->syllables.at(syl).position * 10 + dialogue->Start.GetMS();
int count = karaoke->syllables.at(syl).length * 10;
player->Play(GetSampleAtMS(start),GetSampleAtMS(count));
//return;
}
}
}
@ -1329,7 +1330,7 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) {
}
// Dragging nothing, time from scratch
if (!gotGrab) {
if (!gotGrab && !karMode) {
if (buttonIsDown) {
if (leftIsDown) hold = 3;
else hold = 2;

View file

@ -853,7 +853,9 @@ void VideoDisplayVisual::OnMouseEvent (wxMouseEvent &event) {
diag = parent->grid->GetDialogue(i);
if (diag) {
// Line visible?
if (diag->Start.GetMS() <= startMs && diag->End.GetMS() >= endMs) {
int f1 = VFR_Output.GetFrameAtTime(diag->Start.GetMS(),true);
int f2 = VFR_Output.GetFrameAtTime(diag->End.GetMS(),false);
if (f1 <= frame_n && f2 >= frame_n) {
// Get position
int lineX,lineY;
int torgx,torgy;