65 Commits

Author SHA1 Message Date
Urs Fleisch
580b0b0c82 Inspection: Possibly unused #include directive 2024-01-21 20:46:27 +01:00
Urs Fleisch
fb0f7dfa57 More API documentation corrections 2024-01-17 20:54:56 +01:00
Urs Fleisch
c5d798a50d Correct the API documentation 2024-01-04 17:18:23 +01:00
Urs Fleisch
c9486731d9 Fix MSVC warning needs to have dll-interface (#1185)
Unfortunately, MSVC exports everything (not only public members) when
__declspec(dllexport) is set at the class level via TAGLIB_EXPORT, which
leads to many "needs to have dll-interface to be used by clients" 4251
warnings issued by MSVC, because the std::unique_ptr pimpls are
exported too. As it is not possible to "unexport" private members,
such a warning has to be explicitly suppressed for these cases or
all public and protected class member now have to be exported
for classes derived from a template (StringList, ByteVectorList,
PropertyMap).
2023-12-11 06:35:08 +01:00
nmariusp
3f25d3c342
Proofreading (#1155)
---------

Co-authored-by: Urs Fleisch <ufleisch@users.sourceforge.net>
2023-10-08 05:58:33 +02:00
Rosen Penev
7646184d6b
unused includes (#1133)
* unused includes

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* Use consistent order of includes

Always include in the following order:
- Own header files
- Standard header files
- System header files
- Project header files (toolkit first)

Exceptions:
- cppunit/extensions/HelperMacros.h must be included after
  header files declaring stream operators
- config.h must be included before its definitions are used

---------

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Co-authored-by: Urs Fleisch <ufleisch@users.sourceforge.net>
2023-09-16 08:22:36 +02:00
Rosen Penev
528b84fbde
size() to isEmpty() (#1131)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-09-06 21:23:28 +02:00
Rosen Penev
cdc87aec10
clang-tidy: init members by default (#1110)
Found with modernize-use-default-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-08-30 16:26:14 +02:00
Rosen Penev
185bb7042e
Use unique_ptr for d-pointers (#1095)
* clang-tidy: make deleted members public

One oversight of modernize-use-equals-delete is that the C++11 way of
doing this is to make it public, which makes the warning still trigger.

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: add missing deleted functions

Found with cppcoreguidelines-special-member-functions

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* unique_ptr conversions

unique_ptr is a safer and cleaner way to handle d pointers.

Also added missing = default.

Signed-off-by: Rosen Penev <rosenp@gmail.com>

---------

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-08-07 15:08:40 -05:00
Rosen Penev
c0e9428218
Fix warnings under clang-cl (#1106)
-Wmicrosoft-unqualified-friend
-Wdllexport-explicit-instantiation-decl
-Wunused-parameter

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-08-05 10:07:52 -05:00
Urs Fleisch
d314bfa06a Make sure that own header file is included first
Each header corresponding to a .cpp file must be self-contained,
and can be #included without prerequisites.
2023-07-22 07:09:58 +02:00
Urs Fleisch
231772b2ad clang-tidy: Delete unimplemented private constructors
run-clang-tidy -header-filter='.*' -checks='-*,modernize-use-equals-delete' -fix
2023-07-22 07:09:58 +02:00
Urs Fleisch
c2c9e8989c clang-tidy: Use auto where it improves the readability
run-clang-tidy -header-filter='.*' -checks='-*,modernize-use-auto' \
-config="{CheckOptions: [{key: modernize-use-auto.RemoveStars, value: '1'}]}" \
-fix

Manually fixed some wrong `const auto` replacements and verified
that all types are deduced correctly.
2023-07-22 07:09:58 +02:00
Urs Fleisch
9867bc947e clang-tidy: Use override keyword
run-clang-tidy -header-filter='.*' -checks='-*,modernize-use-override' -fix
2023-07-22 07:09:58 +02:00
Urs Fleisch
ceb142c9bd Remove functions documented (but not marked) as deprecated
Clean up other stuff with comments about binary incompatibility,
but only as far as to mostly keep source compatibility.
2023-07-09 07:01:37 +02:00
Urs Fleisch
ca8c2e07ec Support large files over 2GB on Windows (#1089)
Backport of 4dcf0b41c687292e7b1263a679921c157ae2c22a
b01f45e141afa6a89aea319a2783f177e202fa1d
https://github.com/taglib/taglib/pull/77

Tested with files larger than 2GB which have been created using

sox -n -r 44100 -C 320 large.mp3 synth 58916 sine 440 channels 2
sox -n -r 44100 -C 0 large.flac synth 25459 sine 440 channels 2
sox -n -r 44100 -C 10 large.ogg synth 229806 sine 440 channels 2
sox -n -r 44100 large.wav synth 6692 sine 440 channels 2
ffmpeg -f lavfi -i "sine=frequency=440:duration=244676" -y large.m4a

The only file which was readable with the tagreader example
before this commit was large.ogg. The problem is that long on
Windows is only 32-bit (also in LLP64 data model of 64-bit
compilation target) and all the file offsets using long are
too small for large files. Now long is replaced by offset_t
(defined to be long long on Windows and off_t on UNIX) for such
cases and some unsigned long are now size_t, which has the
correct size even on Windows.
2023-07-09 07:01:37 +02:00
Rosen Penev
4dc6bdcd28 clang-tidy: add ending namespace comments
Found with google-readability-namespace-comments

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-28 07:04:42 +01:00
Rosen Penev
68ac7c3106 clang-tidy: use C++ casting
Found with google-readability-casting

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-21 06:49:32 +02:00
Rosen Penev
b77e828d4b clang-tidy: remove redundant initializations
Found with readability-redundant-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-21 06:49:32 +02:00
Jonas Kvinge
e72a98903f Fix spelling and typos 2019-08-26 23:23:33 +02:00
Tsuda Kageyu
406e872ac3 Always use parentheses with new. It's a bit safer. 2017-01-16 01:00:28 +09:00
Tsuda Kageyu
fffff35ca5 Correct the license information. 2016-02-06 01:27:36 +09:00
Tsuda Kageyu
a0b8683656 Use a standard type rather than TagLib::uint.
This won't break the ABI compatibility.
2015-12-03 02:15:41 +09:00
Tsuda Kageyu
085a0ef298 Use a standard type rather than TagLib::ulong.
This won't break the ABI compatibility.
2015-12-03 00:03:06 +09:00
Tsuda Kageyu
dcc0fe553c Use a standard type rather than TagLib::ushort.
This won't break the ABI compatibility.
2015-12-02 18:59:45 +09:00
Tsuda Kageyu
8bdddaabce Use a standard type rather than TagLib::uchar.
This won't break the ABI compatibility.
2015-12-02 18:11:52 +09:00
Tsuda Kageyu
8c6fe45453 Avoid using String::null where an empty string is required.
String::null is not necessarily be empty or remains the same instance.
Using it in a public header may lead to a linkage error.
2015-11-20 22:21:47 +09:00
Tsuda Kageyu
78c70cf5bb MOD: AudioProperties improvements
Add lengthInSeconds(), lengthInMilliseconds() properties. (always return 0)
2015-06-18 18:03:53 +09:00
Tsuda Kageyu
418a6c79cb Comment update: Added some supplementary explanations and fixed some spellings. 2013-06-23 02:08:10 +09:00
Tsuda Kageyu
f77a84486e Fixed comments for File constructors 2013-05-30 02:04:10 +09:00
gonemad
6b9ef6421f Fixed indents 2012-10-11 22:10:19 -04:00
gonemad
d15c8453ac Added check if file is open before attempting to read tags 2012-10-11 21:20:03 -04:00
Lukáš Lalinský
f11b206fe8 Do not delete the IOStream object in TagLib::File 2012-09-06 19:43:52 +02:00
Tsuda Kageyu
590cd4c9f6 Fix warnings with VS2010 2012-08-23 20:54:18 +09:00
BSDKaffee
3bc123aed6 - Disambiguate uint and ushort references 2012-07-15 01:57:53 -04:00
Birunthan Mohanathas
06597123b8 Remove trailing whitespace 2012-04-19 13:09:45 +03:00
Michael Helmling
de51307de7 Added lots of missing includes 2012-02-15 21:54:19 +01:00
Michael Helmling
e4d955d6ef Migration to new PropertyMap ... done ape to mod. 2012-01-21 14:52:24 +01:00
Michael Helmling
67d896e6a7 Implemented the most easy comments on the pull request. 2012-01-14 22:02:17 +01:00
Michael Helmling
0eaf3a3fbd Implemented dict interface for more formats.
Now supported: MOD files (IT, MOD, S3M, XM), RIFF files
(AIFF, WAV), TrueAudio, WavPack.
2011-11-02 21:02:35 +01:00
Scott Wheeler
98d6b97798 Fix warning 2011-07-27 23:22:23 +02:00
Scott Wheeler
019fe4843f ByteVector works on chars, not unsigned chars, so there needs to be a cast before the comparison 2011-07-27 23:14:54 +02:00
Scott Wheeler
bb25953767 These methods can't be protected since they're called from IT::File
In general this code could use a fair bit of tidying up both stylistically and semantically.
2011-07-27 23:07:38 +02:00
Mathias Panzenböck
f3447ae38d style fixes for enum value names 2011-06-25 01:54:22 +02:00
Mathias Panzenböck
89861cf77a style fixes: { on same line with if/else/for 2011-06-25 01:10:19 +02:00
Mathias Panzenböck
c7fd4cd2fc IT: the max. 8000 bytes msg. length have to include the NUL 2011-06-24 01:53:20 +02:00
Mathias Panzenböck
57526c6c37 IT: add term. NUL to messages 2011-06-24 01:50:43 +02:00
Mathias Panzenböck
9c27c45eb8 IT: strings require term. NUL. mod files: tableLength -> lengthInPatterns
Also added enums for S3M/IT/XM flags.
2011-06-24 01:11:10 +02:00
Mathias Panzenböck
e71806b6df IT: volume is only a byte in size 2011-06-23 20:48:04 +02:00
Mathias Panzenböck
7236ef4d0f S3M+IT: fix reading, IT: untested support for message writing
IT: reading was off starting with global volume because of wrong read size.
S3M+IT: correctly read the number of used patterns.
IT: fixed reading of message tag and implemented writing of message tag
(not tested yet).

I also added S3M+IT test files. TODO: Unit tests using them.
2011-06-23 05:41:23 +02:00