List and edit in-memory sounds in soundbanks
This commit is contained in:
@@ -93,6 +93,24 @@ def test_replace_apply_revert_byte_identical(win, tmp_path):
|
||||
assert not w.ws.store.entries
|
||||
|
||||
|
||||
def test_bank_sound_apply_revert_in_editor(win, tmp_path):
|
||||
w, root, originals = win
|
||||
before = files(root)
|
||||
w.cmb_arch.setCurrentText("BANK")
|
||||
assert w.proxy.rowCount() == 5
|
||||
assert w.select_name("CHR_SynthFoley_1")
|
||||
ed = w.editor
|
||||
assert "bank CHR_SynthFoley (2 copies)" in ed.meta.text()
|
||||
wav = str(tmp_path / "foley.wav")
|
||||
audio.save_wav(wav, *synth.tone(0.2, 44100, 1300))
|
||||
assert ed.load_file(wav)
|
||||
ed._update_new()
|
||||
ed.apply()
|
||||
assert w.ws.state(ed.sound) == W.MODIFIED and files(root) != before
|
||||
ed.revert()
|
||||
assert files(root) == before and not w.ws.store.entries
|
||||
|
||||
|
||||
def test_record_simulated_input(win):
|
||||
w, root, _ = win
|
||||
w.select_name("CHR_RadioScanner_1")
|
||||
|
||||
Reference in New Issue
Block a user