Skip to content

Commit

Permalink
use existing file as base for exported beq filter if possible #459
Browse files Browse the repository at this point in the history
  • Loading branch information
3ll3d00d committed Sep 10, 2023
1 parent 8cb0f1a commit 452d433
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/python/app.py
Expand Up @@ -1128,7 +1128,9 @@ def y1_min_minus_10(self):
def export_beq_filter(self):
file_name = self.__get_save_file_name_from_signal_if_possible('xml', 'BEQ Filter', default_name='beq')
if len(file_name) > 0:
if getattr(sys, 'frozen', False):
if os.path.exists(file_name):
file_path = file_name
elif getattr(sys, 'frozen', False):
file_path = os.path.join(sys._MEIPASS, 'flat24hd.xml')
else:
file_path = os.path.abspath(os.path.join(os.path.dirname('__file__'), '../xml/flat24hd.xml'))
Expand Down
2 changes: 2 additions & 0 deletions src/main/python/model/iir.py
Expand Up @@ -1416,6 +1416,8 @@ def from_equalizer_apo(filt: str, fs: int=48000) -> Optional[Biquad]:
return HighShelf(fs, fc, float(tokens[9]), float(tokens[6]))
elif f_type == 'AP':
return AllPass(fs, fc, float(tokens[6]))
elif tokens[0] == 'Preamp':
return Gain(fs, float(tokens[1]))
return None


Expand Down

0 comments on commit 452d433

Please sign in to comment.