ptformat: Make PT import more resilient to bad user choices and display messages
authorDamien Zammit <damien@zamaudio.com>
Sat, 16 Apr 2016 06:31:44 +0000 (16:31 +1000)
committerRobin Gareus <robin@gareus.org>
Sat, 16 Apr 2016 10:21:12 +0000 (12:21 +0200)
commit277893b130f5ec1efa4aba44d92f038dad2793ef
tree7af786a3eb95a2a67ef1a80d5adbb2bbfa5f5253
parent241f734af475cec96dcb6f9d1aad77a6e2ec2a8d
ptformat: Make PT import more resilient to bad user choices and display messages

Previously, libptformat would attempt to parse all kinds of files,
now the library stops parsing when the version number and session rate
is outside valid ranges, returning an error code to the caller.

If there is a valid PT file detected, but some audio files are missing,
Ardour now pops up an error message to inform the user that some files
may be missing from the import.  A success message is displayed otherwise.

Signed-off-by: Damien Zammit <damien@zamaudio.com>
gtk2_ardour/editor_pt_import.cc
libs/ptformat/ptfformat.cc
libs/ptformat/ptfformat.h