mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-25 08:32:32 +00:00
Sorting out sample rate info in clip display to support Contact Collator
plugin
This commit is contained in:
parent
a62cff4f11
commit
2842143613
@ -288,8 +288,8 @@ public class ClipDisplayUnit extends PamPanel {
|
||||
String tStr = PamCalendar.formatTime(clipDataUnit.getTimeMilliseconds(), true);
|
||||
g.drawString(tStr, borderSize, fontAscent);
|
||||
|
||||
|
||||
String lenString = String.format("%3.2fs", (float)clipDataUnit.getSampleDuration() / clipDisplayPanel.getSampleRate());
|
||||
float fs = clipDataUnit.getSourceSampleRate(); // was clipDisplayPanel.getSampleRate()
|
||||
String lenString = String.format("%3.2fs", (float)clipDataUnit.getSampleDuration() / fs);
|
||||
Rectangle2D strSize = fm.getStringBounds(lenString, g);
|
||||
g.drawString(lenString, (int) (getWidth()-strSize.getWidth()), getHeight()-fm.getDescent());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user