Skip to content

Commit

Permalink
use *.wav format for demodulated signal export
Browse files Browse the repository at this point in the history
  • Loading branch information
jopohl committed Dec 29, 2020
1 parent 8af7da3 commit 0c8f383
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/urh/controller/widgets/SignalFrame.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,12 @@ def save_signal_as(self):

def export_demodulated(self):
try:
initial_name = self.signal.name + "-demodulated.complex"
initial_name = self.signal.name + "-demodulated.wav"
except Exception as e:
logger.exception(e)
initial_name = "demodulated.complex"
initial_name = "demodulated.wav"

filename = FileOperator.ask_save_file_name(initial_name)
filename = FileOperator.ask_save_file_name(initial_name, caption="Export demodulated")
if filename:
try:
self.setCursor(Qt.WaitCursor)
Expand Down
2 changes: 2 additions & 0 deletions src/urh/util/FileOperator.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ def ask_save_file_name(initial_name: str, caption="Save signal", selected_name_f
name_filter = "Frequency Time (*.ft);;Frequency Time Amplitude (*.fta)"
elif caption == "Save protocol":
name_filter = ";;".join([PROTOCOL_FILE_FILTER, BINARY_PROTOCOL_FILE_FILTER])
elif caption == "Export demodulated":
name_filter = WAV_FILE_FILTER
else:
name_filter = EVERYTHING_FILE_FILTER

Expand Down

0 comments on commit 0c8f383

Please sign in to comment.