71 Commits

Author SHA1 Message Date
Paweł Kołodziejski ebbfd826d5 ALL: Upgrade tools licence to GPLv3+ 2022-06-26 19:14:49 +02:00
Adrian Frühwirth c44c25561c TOOLS: Fix internal FLAC encoder
This commit fixes the internal FLAC encoder to properly handle
input of different endianness which means compressing audio with FLAC
should now work as expected on all supported platforms.

Up until now the encoder only worked with signed 16-bit PCM in native
endianess which worked in most cases because most games using 16-bit
audio use pcm_s16le and scummvm-tools are usually run on LE x86/x86_64
hardware.

Two cases of s16be audio are the recently unlocked (see commit 72655d8)
speech sample in Indiana Jones and the Fate of Atlantis as well as
certain Mac versions of Broken Sword 1.
2018-06-09 23:37:27 +02:00
Alexandre Detiste 50102a8b17 TOOLS: Fix typos 2016-02-12 21:33:48 +01:00
Johannes Schickel ddec903aeb TOOLS: Fix compiler warning in FLAC compression code. 2015-11-23 02:16:24 +01:00
Thierry Crozat d5c8077933 JANITORIAL: Move copyright notice to a separate file 2014-01-19 18:13:09 +00:00
Thierry Crozat fe2d3c2d71 JANITORIAL: Remove now useless SVN tags 2014-01-06 22:54:34 +00:00
Thierry Crozat 9a505bf162 TOOLS: Add EOL in the Tool print, warning and error function
This is consistent with the Common warning and error functions from
both ScummVM and the tools. Only the functions from the class Tool
didn't add EOL automatically. Unsurprisingly the End Of Line was
then missing in many places were these functions were called.
2011-11-24 22:06:47 +00:00
Thierry Crozat 79ebea97c5 TOOLS: Improve GUI for Ogg encoding options
This makes it possible to encode using a target quality instead of
target bitrate and also makes min and max bitrates optionals.
This fixes bug #3092367.
2011-04-06 18:23:21 +01:00
Thierry Crozat 4073a8ec43 TOOLS: Accept quality of -1 for ogg compression
The tool was only accepting integer quality between 0 and 10.
However the documentation for oggenc and libvorbisenc states
that the valid range is between -1 and 10 and that fractional values
are also valid. Now the CLI tools does the same. I have not changed
the GUI.

svn-id: r52097
2010-08-15 11:20:23 +00:00
Johannes Schickel e6a090d6f7 Strip trailing whitespaces.
svn-id: r51095
2010-07-21 18:24:07 +00:00
Thierry Crozat a013a241ab Add option to compress MP3 in constant bit rate. This has only been added to the command line tool for the moment (i.e. the option is not available in the GUI yet). Also fix a but that meant encoding in VBR was always using the default target bit rate (64 kb/s) and ignoring the one given by the user.
svn-id: r50029
2010-06-18 21:03:40 +00:00
Thierry Crozat 38c17b4c76 Change the way the flags are interpreted for MP3 compression. The main impact is that now minimum and maximum bitrates are undefined by default and not passed to lame if they are not defined explicitly. They can also be used for both ABR and VBR now.
Also improved the GUI tools MP3 option page. When switching between ABR and VBR only the relevant options remain visible. The page has not been changed to allow use of minimum and maximum bitrates for ABR though (and they are still always used for VBR). So the user does not have as much flexibility with MP3 options when using the GUI tools than he has with the CLI version.

svn-id: r48974
2010-05-08 22:42:29 +00:00
Max Horn f4a8acf4dc Replace calls to unlink() by new function Common::removeFile()
svn-id: r48937
2010-05-04 12:00:35 +00:00
Thierry Crozat e8ad0731bd Remove rounding to multiples of 8 for ogg encoding bitrates.
This was introduced in GSoC 2007 to mimic what was done for MP3 encoding I think. But while the lame documentation says this must effectively be the case for lame, I didn't see any such limitations for oggenc, the Ogg Vorbis library or the Tremor library.

svn-id: r48916
2010-05-03 16:50:47 +00:00
Max Horn 136fe2a8a7 TOOLS: Get rid of unnecessary #include <unistd.h>.
If it is needed after all on some systems, please re-add it
(or tell me) with a comment explaining for what it is needed.

svn-id: r48900
2010-05-03 11:14:10 +00:00
Martin Kiewitz f32d16ee98 tools: don't include unistd.h for msvc
svn-id: r48885
2010-05-01 20:45:57 +00:00
Thierry Crozat d1848190b0 Improve arguments handling when using tools to compress to MP3.
Do not give a maximum bitrate to lame when encoding to ABR MP3 since the lame documentation says "this is NOT RECOMMENDED". Also use a different variable for ABR target bitrate and VBR minimum bitrate and make sure the VBR minimum bitrate is a multiple of 8 since this is required by lame. The ABR target bitrate however does not need to be a multiple of 8.
Also fix incorrect use of %d in the compression tool help.

svn-id: r48849
2010-04-28 23:22:32 +00:00
Thierry Crozat 945102910f Change CLI flag for lame path to --lame-path.
svn-id: r48612
2010-04-10 21:42:42 +00:00
Thierry Crozat d25c6505ee Fix bug #2905473: GUI Tools: cannot use lame
A lame path option has been added when using MP3 compression. For CLI it can be set using -lame-path. In the GUI it can be set in the advanced MP3 options page. There is also a check on lame in the GUI tools now.

svn-id: r48610
2010-04-10 20:37:06 +00:00
Max Horn 0a74bb4ef2 Patch #2981339: Tools GUI: fix use of audio options
svn-id: r48517
2010-04-04 19:09:59 +00:00
Ori Avtalion 93e1533ea3 Include <unistd.h> in files that use unlink(). Fixes amiga build.
Patch by Raziel^

svn-id: r48471
2010-04-02 13:53:47 +00:00
Johannes Schickel 7d5ca55db4 Strip trailing whitespaces/tabs.
svn-id: r47542
2010-01-25 01:42:22 +00:00
Johannes Schickel b5987160e3 - Fix a memory leak upon throwing a ToolException.
- Some style fixes.

svn-id: r47537
2010-01-25 01:00:52 +00:00
Eugene Sandulenko 35b3f0e845 Give more correct name to encodeAIF()
svn-id: r47050
2010-01-05 21:52:28 +00:00
Eugene Sandulenko 4ae3c1485e Patch #2925880: "Tools: memory leak in compress_sword1"
svn-id: r47049
2010-01-05 21:46:28 +00:00
Eugene Sandulenko b03d79c3a4 Patch #2925828: "Tools: add BS1 mac compression in compress_sword1"
svn-id: r46991
2010-01-04 21:23:02 +00:00
Max Horn c98ccccc51 Patch #2925824: TOOLS: fix compilation and bundle creation issues
svn-id: r46988
2010-01-04 20:57:19 +00:00
Max Horn 38597aaacf TOOLS: Remove CompressionFormat enum
svn-id: r46985
2010-01-04 20:52:16 +00:00
Jordi Vilalta Prat eae07f9e8a TOOLS: Whitespace cleanup
svn-id: r46751
2009-12-30 15:34:00 +00:00
Max Horn b4225dcf2a Use stdio.h instead of cstdio etc.
svn-id: r46711
2009-12-29 17:30:38 +00:00
Johannes Schickel 5c8aebb3c2 Fix compilation.
svn-id: r46709
2009-12-29 16:58:54 +00:00
Eugene Sandulenko 333e3ff656 Fix warning
svn-id: r46703
2009-12-29 08:47:20 +00:00
Eugene Sandulenko a1c098c62c Switched from DISABLE_BUILTIN_FLAC|VORBIS to USE_* generated by configure
svn-id: r46702
2009-12-29 08:44:59 +00:00
Eugene Sandulenko f45727c631 Remove reduntant checks. The parameters are unsigned.
svn-id: r46590
2009-12-26 15:12:56 +00:00
Max Horn 218faae43d cleanup
svn-id: r46499
2009-12-23 14:15:12 +00:00
Eugene Sandulenko e59ac35456 Made logs more compact
svn-id: r46458
2009-12-21 06:13:40 +00:00
Max Horn a003aa6309 TOOLS: Move class File into namespace Common
svn-id: r46452
2009-12-20 23:02:50 +00:00
Eugene Sandulenko 2a1a5cef37 Fix misleading behavior with temp file extention being always .mp3 when run via GUI.
svn-id: r46438
2009-12-20 19:42:02 +00:00
Eugene Sandulenko ed4e86001f Whitespaces
svn-id: r46436
2009-12-20 19:09:17 +00:00
Sven Hesse 19b30fda76 Adding needed standard includes to make the tools compile again for me
svn-id: r46401
2009-12-17 02:08:22 +00:00
Max Horn 67562a8c9a cleanup
svn-id: r46376
2009-12-14 00:14:23 +00:00
Max Horn 9c5b48eedb TOOLS: Rename&merge File::read & readN methods to read_throwsOnError & read_noThrow (these should be changed again later, but for now this helps me not getting confused ;)
svn-id: r46373
2009-12-13 23:46:09 +00:00
Max Horn 51ae0edfcb TOOLS: Change signature of File::write to match ScummVM
svn-id: r46370
2009-12-13 22:21:25 +00:00
Max Horn 138a720019 GUI TOOLS: Some cleanup (e.g. move compression specific stuff to compress.h, where it belongs)
svn-id: r46359
2009-12-13 19:49:49 +00:00
Joost Peters 0bd5682c96 fix --mp3/vorbis/flac argument parsing swallowing the last non-audio argument
svn-id: r46031
2009-11-21 00:37:54 +00:00
Max Horn dda1cf6a74 Fixed buggy argument handling in GSoC tools code
svn-id: r44368
2009-09-25 19:51:35 +00:00
Max Horn f7d8962b51 cleanup
svn-id: r44367
2009-09-25 19:38:24 +00:00
Hampus Nilsson 32b442b84b *Out of bounds parameters now causes errors instead of truncating the value.
svn-id: r42933
2009-07-30 15:29:11 +00:00
Hampus Nilsson 4fe365c5e1 *Greatly increased robustness of parsing arguments, error messages should now make sense in most cases.
*Tool specific arguments are now entered before the filename, as intended.

svn-id: r42878
2009-07-29 02:09:01 +00:00
Hampus Nilsson caa5f500f0 *Fixed tools reading beyond end of arguments if you used invalid syntax.
svn-id: r42871
2009-07-29 00:04:45 +00:00