List and edit in-memory sounds in soundbanks
This commit is contained in:
@@ -260,10 +260,14 @@ class EditorPanel(QWidget):
|
||||
self.title.setText(s.name)
|
||||
who = s.character or (("mentions " + s.characters_inferred) if s.characters_inferred else "—")
|
||||
lim = self.ctx.ws.limit(s)
|
||||
self.meta.setText("%s / %s • %s • %.2f s, %d Hz, %s • max size: %s • %s"
|
||||
where = ""
|
||||
if s.bank:
|
||||
n = len(self.ctx.ws.locations(s))
|
||||
where = " • bank %s (%d %s)" % (s.bank, n, "copy" if n == 1 else "copies")
|
||||
self.meta.setText("%s / %s • %s • %.2f s, %d Hz, %s • max size: %s • %s%s"
|
||||
% (s.group, s.category, who, s.seconds, s.rate,
|
||||
{1: "mono", 2: "stereo"}.get(s.channels, "%d ch" % s.channels),
|
||||
"any" if lim is None else "%.1f KB" % (lim / 1024.0), s.key))
|
||||
"any" if lim is None else "%.1f KB" % (lim / 1024.0), s.key, where))
|
||||
key = s.key
|
||||
ws = self.ctx.ws
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ from PySide6.QtWidgets import (QAbstractItemView, QCheckBox, QComboBox, QDialog,
|
||||
QPushButton, QScrollArea, QSplitter, QTableView, QToolBar, QVBoxLayout, QWidget)
|
||||
|
||||
from ackit import settings as settings_mod, workspace as W
|
||||
from ackit.catalog import available_archives
|
||||
from ackit.game import Game, GameError, default_game_dir
|
||||
from ackit.modpack import export_mod, match_mod, prepare_import
|
||||
from . import icons, theme
|
||||
@@ -257,8 +258,9 @@ class MainWindow(QMainWindow):
|
||||
full = self.settings.get("full_backup", True)
|
||||
|
||||
def work(job):
|
||||
return W.Workspace(game, store, [lang, "SFX"] if "SFX" in game.archives else [lang], full_backup=full,
|
||||
progress=lambda n, t: job.report("scanning %s: %d / %d" % (lang, n, t)))
|
||||
avail = available_archives(game)
|
||||
return W.Workspace(game, store, [a for a in (lang, "SFX", "BANK") if a in avail], full_backup=full,
|
||||
progress=lambda n, t: job.report("scanning game audio: %d / %d" % (n, t)))
|
||||
|
||||
def done(ws):
|
||||
self.loading = False
|
||||
|
||||
Reference in New Issue
Block a user