taglib-ruby 1.1.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +15 -11
- data/docs/taglib/mpeg.rb +1 -9
- data/ext/extconf_common.rb +21 -12
- data/ext/taglib_aiff/taglib_aiff.i +4 -0
- data/ext/taglib_aiff/taglib_aiff_wrap.cxx +222 -59
- data/ext/taglib_base/includes.i +14 -14
- data/ext/taglib_base/taglib_base.i +21 -0
- data/ext/taglib_base/taglib_base_wrap.cxx +289 -350
- data/ext/taglib_flac/taglib_flac.i +7 -3
- data/ext/taglib_flac/taglib_flac_wrap.cxx +233 -336
- data/ext/taglib_flac_picture/taglib_flac_picture.i +4 -0
- data/ext/taglib_flac_picture/taglib_flac_picture_wrap.cxx +125 -71
- data/ext/taglib_id3v1/taglib_id3v1_wrap.cxx +92 -51
- data/ext/taglib_id3v2/taglib_id3v2.i +5 -0
- data/ext/taglib_id3v2/taglib_id3v2_wrap.cxx +524 -414
- data/ext/taglib_mp4/taglib_mp4.i +21 -18
- data/ext/taglib_mp4/taglib_mp4_wrap.cxx +2062 -1467
- data/ext/taglib_mpeg/taglib_mpeg.i +5 -0
- data/ext/taglib_mpeg/taglib_mpeg_wrap.cxx +414 -300
- data/ext/taglib_ogg/taglib_ogg.i +0 -2
- data/ext/taglib_ogg/taglib_ogg_wrap.cxx +44 -42
- data/ext/taglib_vorbis/taglib_vorbis_wrap.cxx +27 -48
- data/ext/taglib_wav/taglib_wav.i +5 -2
- data/ext/taglib_wav/taglib_wav_wrap.cxx +179 -89
- data/lib/taglib/version.rb +3 -3
- data/tasks/ext.rake +23 -39
- data/tasks/swig.rake +14 -4
- data/test/id3v2_write_test.rb +1 -1
- data/test/wav_examples_test.rb +1 -1
- data/test/wav_file_test.rb +1 -1
- data/test/wav_file_write_test.rb +6 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 659d2ce981f60aaee4cdc2ada2ace70d33d55f2f1414478f03a8088facaedb98
|
4
|
+
data.tar.gz: 4baf4450e6903749e1f5a9829d2f83e4fa3809ec24974950d006992a50c35c78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3df1ff745ae3e67a269f69f20820372c25d91a5d51fe916ffc590014518dad82d8674a526df4763449543246bef6e23d4ba6766513d5214c96e68b3a14b89846
|
7
|
+
data.tar.gz: f114af2a78f0ea69335ceff09cc1152ca9050b8519ebc318b85a854734d063f531cdf6176c10e1c487533d7fef58819e0a35431940a4c75e836c2e76e1f3e1c0
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,22 @@ All notable changes to this project will be documented in this file.
|
|
6
6
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
7
7
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
8
8
|
|
9
|
+
## 2.0.0
|
10
|
+
### Changed
|
11
|
+
- Regenerate SWIG wrapper code against TagLib 2.0.1. This breaks
|
12
|
+
compatibility with TagLib 1.x. You will get a compiler error if you
|
13
|
+
try to install taglib-ruby 2.x on a system that has TagLib 1.x.
|
14
|
+
Please use taglib-ruby 1.x if your system has TagLib 1.x, and
|
15
|
+
taglib-ruby 2.x if your system has TagLib 2.x.
|
16
|
+
- The optional `strip_others` argument to `TagLib::MPEG::File#save` no
|
17
|
+
longer takes a boolean value. It now uses the constants
|
18
|
+
`TagLib::File::StripOthers` and `TagLib::File::StripNone`.
|
19
|
+
|
20
|
+
### Removed
|
21
|
+
- `TagLib::MPEG::File#tag` has been removed because it no longer
|
22
|
+
exists in TagLib 2.x. Please use `TagLib::MPEG::File#id3v2_tag` or
|
23
|
+
`TagLib::MPEG::File#id3v1_tag`.
|
24
|
+
|
9
25
|
## 1.1.3 - 2022-12-29
|
10
26
|
### Changed
|
11
27
|
- Fix warning `warning: undefining the allocator of T_DATA class
|
data/README.md
CHANGED
@@ -30,9 +30,13 @@ installed with header files (and a C++ compiler of course):
|
|
30
30
|
* Brew: `brew install taglib`
|
31
31
|
* MacPorts: `sudo port install taglib`
|
32
32
|
|
33
|
-
Then
|
33
|
+
Then install the latest taglib-ruby 1.x by running:
|
34
34
|
|
35
|
-
gem install taglib-ruby
|
35
|
+
gem install taglib-ruby --version '< 2'
|
36
|
+
|
37
|
+
If you are using TagLib 2.0.1 or higher, you need to install taglib-ruby 2.x instead:
|
38
|
+
|
39
|
+
gem install taglib-ruby --version '>= 2'
|
36
40
|
|
37
41
|
### MacOS
|
38
42
|
|
@@ -40,16 +44,20 @@ Depending on your brew setup, TagLib might be installed in different locations,
|
|
40
44
|
which makes it hard for taglib-ruby to find it. To get the library location, run:
|
41
45
|
|
42
46
|
$ brew info taglib
|
43
|
-
taglib: stable 1.
|
47
|
+
taglib: stable 1.13 (bottled), HEAD
|
44
48
|
Audio metadata library
|
45
49
|
https://taglib.org/
|
46
|
-
/
|
50
|
+
/opt/homebrew/Cellar/taglib/1.13 (122 files, 1.6MB) *
|
47
51
|
...
|
48
52
|
|
49
53
|
Note the line with the path at the end. Provide that using the `TAGLIB_DIR`
|
50
54
|
environment variable when installing, like this:
|
51
55
|
|
52
|
-
TAGLIB_DIR=/
|
56
|
+
TAGLIB_DIR=/opt/homebrew/Cellar/taglib/1.13 gem install taglib-ruby
|
57
|
+
|
58
|
+
If you're using bundler, like this:
|
59
|
+
|
60
|
+
TAGLIB_DIR=/opt/homebrew/Cellar/taglib/1.13 bundle install
|
53
61
|
|
54
62
|
Another problem might be that `clang++` doesn't work with a specific version
|
55
63
|
of TagLib. In that case, try compiling taglib-ruby's C++ extensions with a
|
@@ -116,18 +124,14 @@ Build a specific version of Taglib:
|
|
116
124
|
The above command will automatically download Taglib 1.11.1, build it and
|
117
125
|
install it in `tmp/x86_64-linux/taglib-1.11.1`.
|
118
126
|
|
119
|
-
The `swig` and `
|
127
|
+
The `swig`, `compile` and `test` tasks can then be executed against that specific
|
120
128
|
version of Taglib by setting the `TAGLIB_DIR` environment variable to
|
121
129
|
`$PWD/tmp/x86_64-linux/taglib-1.11.1` (it is assumed that taglib headers are
|
122
130
|
located at `$TAGLIB_DIR/include` and taglib libraries at `$TAGLIB_DIR/lib`).
|
123
131
|
|
124
|
-
The `test` task can then be run for that version of Taglib by adding
|
125
|
-
`$PWD/tmp/x86_64-linux/taglib-1.11.1/lib` to the `LD_LIBRARY_PATH` environment
|
126
|
-
variable.
|
127
|
-
|
128
132
|
To do everything in one command:
|
129
133
|
|
130
|
-
PLATFORM=x86_64-linux TAGLIB_VERSION=1.11.1 TAGLIB_DIR=$PWD/tmp/x86_64-linux/taglib-1.11.1
|
134
|
+
PLATFORM=x86_64-linux TAGLIB_VERSION=1.11.1 TAGLIB_DIR=$PWD/tmp/x86_64-linux/taglib-1.11.1 rake vendor compile test
|
131
135
|
|
132
136
|
### Workflow
|
133
137
|
|
data/docs/taglib/mpeg.rb
CHANGED
@@ -32,14 +32,6 @@ module TagLib::MPEG
|
|
32
32
|
def initialize(filename, read_properties=true)
|
33
33
|
end
|
34
34
|
|
35
|
-
# Returns a tag that contains attributes from both the ID3v2 and
|
36
|
-
# ID3v1 tag, with ID3v2 attributes having precendence.
|
37
|
-
#
|
38
|
-
# @return [TagLib::Tag]
|
39
|
-
# @return [nil] if not present
|
40
|
-
def tag
|
41
|
-
end
|
42
|
-
|
43
35
|
# Returns the ID3v1 tag.
|
44
36
|
#
|
45
37
|
# @param create if a new tag should be created when none exists
|
@@ -88,7 +80,7 @@ module TagLib::MPEG
|
|
88
80
|
# ArgumentError.
|
89
81
|
#
|
90
82
|
# @return [Boolean] whether saving was successful
|
91
|
-
def save(tags=TagLib::MPEG::File::AllTags, strip_others=
|
83
|
+
def save(tags=TagLib::MPEG::File::AllTags, strip_others=TagLib::File::StripOthers)
|
92
84
|
end
|
93
85
|
|
94
86
|
# Strip the specified tags from the file. Note that this directly
|
data/ext/extconf_common.rb
CHANGED
@@ -1,15 +1,19 @@
|
|
1
1
|
# frozen-string-literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
#
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
3
|
+
taglib_dir = ENV['TAGLIB_DIR']
|
4
|
+
|
5
|
+
unless taglib_dir
|
6
|
+
# Default opt dirs to help mkmf find taglib
|
7
|
+
opt_dirs = ['/usr/local', '/opt/local', '/sw']
|
8
|
+
|
9
|
+
# Heroku vendor dir
|
10
|
+
vendor = ENV.fetch('GEM_HOME', '')[/^[^ ]*\/vendor\//]
|
11
|
+
opt_dirs << "#{vendor}taglib" if vendor
|
12
|
+
opt_dirs_joined = opt_dirs.join(':')
|
13
|
+
|
14
|
+
configure_args = "--with-opt-dir=#{opt_dirs_joined} "
|
15
|
+
ENV['CONFIGURE_ARGS'] = configure_args + ENV.fetch('CONFIGURE_ARGS', '')
|
16
|
+
end
|
13
17
|
|
14
18
|
require 'mkmf'
|
15
19
|
|
@@ -18,14 +22,14 @@ def error(msg)
|
|
18
22
|
abort
|
19
23
|
end
|
20
24
|
|
21
|
-
if
|
25
|
+
if taglib_dir && !File.directory?(taglib_dir)
|
22
26
|
error 'When defined, the TAGLIB_DIR environment variable must point to a valid directory.'
|
23
27
|
end
|
24
28
|
|
25
29
|
# If specified, use the TAGLIB_DIR environment variable as the prefix
|
26
30
|
# for finding taglib headers and libs. See MakeMakefile#dir_config
|
27
31
|
# for more details.
|
28
|
-
dir_config('tag',
|
32
|
+
dir_config('tag', taglib_dir)
|
29
33
|
|
30
34
|
# When compiling statically, -lstdc++ would make the resulting .so to
|
31
35
|
# have a dependency on an external libstdc++ instead of the static one.
|
@@ -46,5 +50,10 @@ end
|
|
46
50
|
|
47
51
|
$CFLAGS << ' -DSWIG_TYPE_TABLE=taglib'
|
48
52
|
|
53
|
+
# TagLib 2.0 requires C++17. Some compilers default to an older standard
|
54
|
+
# so we add this '-std=' option to make sure the compiler accepts C++17
|
55
|
+
# code.
|
56
|
+
$CXXFLAGS << ' -std=c++17'
|
57
|
+
|
49
58
|
# Allow users to override the Ruby runtime's preferred CXX
|
50
59
|
RbConfig::MAKEFILE_CONFIG['CXX'] = ENV['TAGLIB_RUBY_CXX'] if ENV['TAGLIB_RUBY_CXX']
|
@@ -14,12 +14,16 @@
|
|
14
14
|
%ignore TagLib::RIFF::AIFF::Properties::length;
|
15
15
|
%ignore TagLib::RIFF::AIFF::Properties::sampleWidth;
|
16
16
|
|
17
|
+
%ignore TagLib::RIFF::File;
|
18
|
+
%include <taglib/rifffile.h>
|
19
|
+
|
17
20
|
%include <taglib/aiffproperties.h>
|
18
21
|
|
19
22
|
%freefunc TagLib::RIFF::AIFF::File "free_taglib_riff_aiff_file";
|
20
23
|
|
21
24
|
// Ignore IOStream and all the constructors using it.
|
22
25
|
%ignore IOStream;
|
26
|
+
%ignore TagLib::RIFF::AIFF::File::File(IOStream *, bool, Properties::ReadStyle, ID3v2::FrameFactory *);
|
23
27
|
%ignore TagLib::RIFF::AIFF::File::File(IOStream *, bool, Properties::ReadStyle);
|
24
28
|
%ignore TagLib::RIFF::AIFF::File::File(IOStream *, bool);
|
25
29
|
%ignore TagLib::RIFF::AIFF::File::File(IOStream *);
|
@@ -1854,16 +1854,21 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
|
|
1854
1854
|
/* -------- TYPES TABLE (BEGIN) -------- */
|
1855
1855
|
|
1856
1856
|
#define SWIGTYPE_p_TagLib__AudioProperties swig_types[0]
|
1857
|
-
#define
|
1858
|
-
#define
|
1859
|
-
#define
|
1860
|
-
#define
|
1861
|
-
#define
|
1862
|
-
#define
|
1863
|
-
#define
|
1864
|
-
#define
|
1865
|
-
|
1866
|
-
|
1857
|
+
#define SWIGTYPE_p_TagLib__File swig_types[1]
|
1858
|
+
#define SWIGTYPE_p_TagLib__ID3v2__FrameFactory swig_types[2]
|
1859
|
+
#define SWIGTYPE_p_TagLib__ID3v2__Tag swig_types[3]
|
1860
|
+
#define SWIGTYPE_p_TagLib__ID3v2__Version swig_types[4]
|
1861
|
+
#define SWIGTYPE_p_TagLib__RIFF__AIFF__File swig_types[5]
|
1862
|
+
#define SWIGTYPE_p_TagLib__RIFF__AIFF__Properties swig_types[6]
|
1863
|
+
#define SWIGTYPE_p_TagLib__RIFF__File swig_types[7]
|
1864
|
+
#define SWIGTYPE_p_char swig_types[8]
|
1865
|
+
#define SWIGTYPE_p_long_long swig_types[9]
|
1866
|
+
#define SWIGTYPE_p_unsigned_char swig_types[10]
|
1867
|
+
#define SWIGTYPE_p_unsigned_int swig_types[11]
|
1868
|
+
#define SWIGTYPE_p_unsigned_long swig_types[12]
|
1869
|
+
#define SWIGTYPE_p_wchar_t swig_types[13]
|
1870
|
+
static swig_type_info *swig_types[15];
|
1871
|
+
static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0};
|
1867
1872
|
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
1868
1873
|
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
1869
1874
|
|
@@ -1957,34 +1962,26 @@ template <typename T> T SwigValueInit() {
|
|
1957
1962
|
#endif
|
1958
1963
|
|
1959
1964
|
VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) {
|
1960
|
-
|
1961
|
-
return Qnil;
|
1962
|
-
} else {
|
1963
|
-
return rb_str_new(byteVector.data(), byteVector.size());
|
1964
|
-
}
|
1965
|
+
return rb_str_new(byteVector.data(), byteVector.size());
|
1965
1966
|
}
|
1966
1967
|
|
1967
1968
|
TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) {
|
1968
1969
|
if (NIL_P(s)) {
|
1969
|
-
return TagLib::ByteVector
|
1970
|
+
return TagLib::ByteVector();
|
1970
1971
|
} else {
|
1971
1972
|
return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s));
|
1972
1973
|
}
|
1973
1974
|
}
|
1974
1975
|
|
1975
1976
|
VALUE taglib_string_to_ruby_string(const TagLib::String & string) {
|
1976
|
-
|
1977
|
-
|
1978
|
-
|
1979
|
-
VALUE result = rb_str_new2(string.toCString(true));
|
1980
|
-
ASSOCIATE_UTF8_ENCODING(result);
|
1981
|
-
return result;
|
1982
|
-
}
|
1977
|
+
VALUE result = rb_str_new2(string.toCString(true));
|
1978
|
+
ASSOCIATE_UTF8_ENCODING(result);
|
1979
|
+
return result;
|
1983
1980
|
}
|
1984
1981
|
|
1985
1982
|
TagLib::String ruby_string_to_taglib_string(VALUE s) {
|
1986
1983
|
if (NIL_P(s)) {
|
1987
|
-
return TagLib::String
|
1984
|
+
return TagLib::String();
|
1988
1985
|
} else {
|
1989
1986
|
return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8);
|
1990
1987
|
}
|
@@ -2073,6 +2070,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
|
|
2073
2070
|
#endif
|
2074
2071
|
}
|
2075
2072
|
|
2073
|
+
VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) {
|
2074
|
+
#ifdef _WIN32
|
2075
|
+
return LL2NUM(off);
|
2076
|
+
#else
|
2077
|
+
return OFFT2NUM(off);
|
2078
|
+
#endif
|
2079
|
+
}
|
2076
2080
|
|
2077
2081
|
|
2078
2082
|
#include <limits.h>
|
@@ -2092,7 +2096,7 @@ SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2))
|
|
2092
2096
|
}
|
2093
2097
|
|
2094
2098
|
|
2095
|
-
/*@SWIG:/
|
2099
|
+
/*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2096
2100
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg)
|
2097
2101
|
{
|
2098
2102
|
VALUE *args = (VALUE *)arg;
|
@@ -2326,30 +2330,6 @@ free_TagLib_RIFF_AIFF_Properties(void *self) {
|
|
2326
2330
|
delete arg1;
|
2327
2331
|
}
|
2328
2332
|
|
2329
|
-
SWIGINTERN VALUE
|
2330
|
-
_wrap_Properties_length_in_seconds(int argc, VALUE *argv, VALUE self) {
|
2331
|
-
TagLib::RIFF::AIFF::Properties *arg1 = (TagLib::RIFF::AIFF::Properties *) 0 ;
|
2332
|
-
void *argp1 = 0 ;
|
2333
|
-
int res1 = 0 ;
|
2334
|
-
int result;
|
2335
|
-
VALUE vresult = Qnil;
|
2336
|
-
|
2337
|
-
if ((argc < 0) || (argc > 0)) {
|
2338
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2339
|
-
}
|
2340
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__AIFF__Properties, 0 | 0 );
|
2341
|
-
if (!SWIG_IsOK(res1)) {
|
2342
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::AIFF::Properties const *","lengthInSeconds", 1, self ));
|
2343
|
-
}
|
2344
|
-
arg1 = reinterpret_cast< TagLib::RIFF::AIFF::Properties * >(argp1);
|
2345
|
-
result = (int)((TagLib::RIFF::AIFF::Properties const *)arg1)->lengthInSeconds();
|
2346
|
-
vresult = SWIG_From_int(static_cast< int >(result));
|
2347
|
-
return vresult;
|
2348
|
-
fail:
|
2349
|
-
return Qnil;
|
2350
|
-
}
|
2351
|
-
|
2352
|
-
|
2353
2333
|
SWIGINTERN VALUE
|
2354
2334
|
_wrap_Properties_length_in_milliseconds(int argc, VALUE *argv, VALUE self) {
|
2355
2335
|
TagLib::RIFF::AIFF::Properties *arg1 = (TagLib::RIFF::AIFF::Properties *) 0 ;
|
@@ -2574,6 +2554,53 @@ static swig_class SwigClassFile;
|
|
2574
2554
|
|
2575
2555
|
SWIGINTERN VALUE
|
2576
2556
|
_wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
2557
|
+
TagLib::FileName arg1 ;
|
2558
|
+
bool arg2 ;
|
2559
|
+
TagLib::RIFF::AIFF::Properties::ReadStyle arg3 ;
|
2560
|
+
TagLib::ID3v2::FrameFactory *arg4 = (TagLib::ID3v2::FrameFactory *) 0 ;
|
2561
|
+
bool val2 ;
|
2562
|
+
int ecode2 = 0 ;
|
2563
|
+
int val3 ;
|
2564
|
+
int ecode3 = 0 ;
|
2565
|
+
void *argp4 = 0 ;
|
2566
|
+
int res4 = 0 ;
|
2567
|
+
TagLib::RIFF::AIFF::File *result = 0 ;
|
2568
|
+
|
2569
|
+
if ((argc < 4) || (argc > 4)) {
|
2570
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
|
2571
|
+
}
|
2572
|
+
{
|
2573
|
+
arg1 = ruby_string_to_taglib_filename(argv[0]);
|
2574
|
+
if ((const char *)(TagLib::FileName)(arg1) == NULL) {
|
2575
|
+
SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
|
2576
|
+
}
|
2577
|
+
}
|
2578
|
+
ecode2 = SWIG_AsVal_bool(argv[1], &val2);
|
2579
|
+
if (!SWIG_IsOK(ecode2)) {
|
2580
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","File", 2, argv[1] ));
|
2581
|
+
}
|
2582
|
+
arg2 = static_cast< bool >(val2);
|
2583
|
+
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
2584
|
+
if (!SWIG_IsOK(ecode3)) {
|
2585
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::RIFF::AIFF::Properties::ReadStyle","File", 3, argv[2] ));
|
2586
|
+
}
|
2587
|
+
arg3 = static_cast< TagLib::RIFF::AIFF::Properties::ReadStyle >(val3);
|
2588
|
+
res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 );
|
2589
|
+
if (!SWIG_IsOK(res4)) {
|
2590
|
+
SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory *","File", 4, argv[3] ));
|
2591
|
+
}
|
2592
|
+
arg4 = reinterpret_cast< TagLib::ID3v2::FrameFactory * >(argp4);
|
2593
|
+
result = (TagLib::RIFF::AIFF::File *)new TagLib::RIFF::AIFF::File(arg1,arg2,arg3,arg4);
|
2594
|
+
DATA_PTR(self) = result;
|
2595
|
+
SWIG_RubyAddTracking(result, self);
|
2596
|
+
return self;
|
2597
|
+
fail:
|
2598
|
+
return Qnil;
|
2599
|
+
}
|
2600
|
+
|
2601
|
+
|
2602
|
+
SWIGINTERN VALUE
|
2603
|
+
_wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
2577
2604
|
TagLib::FileName arg1 ;
|
2578
2605
|
bool arg2 ;
|
2579
2606
|
TagLib::RIFF::AIFF::Properties::ReadStyle arg3 ;
|
@@ -2612,7 +2639,7 @@ fail:
|
|
2612
2639
|
|
2613
2640
|
|
2614
2641
|
SWIGINTERN VALUE
|
2615
|
-
|
2642
|
+
_wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) {
|
2616
2643
|
TagLib::FileName arg1 ;
|
2617
2644
|
bool arg2 ;
|
2618
2645
|
bool val2 ;
|
@@ -2658,7 +2685,7 @@ _wrap_File_allocate(int argc, VALUE *argv, VALUE self)
|
|
2658
2685
|
|
2659
2686
|
|
2660
2687
|
SWIGINTERN VALUE
|
2661
|
-
|
2688
|
+
_wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) {
|
2662
2689
|
TagLib::FileName arg1 ;
|
2663
2690
|
TagLib::RIFF::AIFF::File *result = 0 ;
|
2664
2691
|
|
@@ -2682,11 +2709,11 @@ fail:
|
|
2682
2709
|
|
2683
2710
|
SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) {
|
2684
2711
|
int argc;
|
2685
|
-
VALUE argv[
|
2712
|
+
VALUE argv[4];
|
2686
2713
|
int ii;
|
2687
2714
|
|
2688
2715
|
argc = nargs;
|
2689
|
-
if (argc >
|
2716
|
+
if (argc > 4) SWIG_fail;
|
2690
2717
|
for (ii = 0; (ii < argc); ++ii) {
|
2691
2718
|
argv[ii] = args[ii];
|
2692
2719
|
}
|
@@ -2695,7 +2722,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) {
|
|
2695
2722
|
int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
|
2696
2723
|
_v = SWIG_CheckState(res);
|
2697
2724
|
if (_v) {
|
2698
|
-
return
|
2725
|
+
return _wrap_new_File__SWIG_3(nargs, args, self);
|
2699
2726
|
}
|
2700
2727
|
}
|
2701
2728
|
if (argc == 2) {
|
@@ -2708,7 +2735,7 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) {
|
|
2708
2735
|
_v = SWIG_CheckState(res);
|
2709
2736
|
}
|
2710
2737
|
if (_v) {
|
2711
|
-
return
|
2738
|
+
return _wrap_new_File__SWIG_2(nargs, args, self);
|
2712
2739
|
}
|
2713
2740
|
}
|
2714
2741
|
}
|
@@ -2727,14 +2754,40 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) {
|
|
2727
2754
|
_v = SWIG_CheckState(res);
|
2728
2755
|
}
|
2729
2756
|
if (_v) {
|
2730
|
-
return
|
2757
|
+
return _wrap_new_File__SWIG_1(nargs, args, self);
|
2758
|
+
}
|
2759
|
+
}
|
2760
|
+
}
|
2761
|
+
}
|
2762
|
+
if (argc == 4) {
|
2763
|
+
int _v = 0;
|
2764
|
+
int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
|
2765
|
+
_v = SWIG_CheckState(res);
|
2766
|
+
if (_v) {
|
2767
|
+
{
|
2768
|
+
int res = SWIG_AsVal_bool(argv[1], NULL);
|
2769
|
+
_v = SWIG_CheckState(res);
|
2770
|
+
}
|
2771
|
+
if (_v) {
|
2772
|
+
{
|
2773
|
+
int res = SWIG_AsVal_int(argv[2], NULL);
|
2774
|
+
_v = SWIG_CheckState(res);
|
2775
|
+
}
|
2776
|
+
if (_v) {
|
2777
|
+
void *vptr = 0;
|
2778
|
+
int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0);
|
2779
|
+
_v = SWIG_CheckState(res);
|
2780
|
+
if (_v) {
|
2781
|
+
return _wrap_new_File__SWIG_0(nargs, args, self);
|
2782
|
+
}
|
2731
2783
|
}
|
2732
2784
|
}
|
2733
2785
|
}
|
2734
2786
|
}
|
2735
2787
|
|
2736
2788
|
fail:
|
2737
|
-
Ruby_Format_OverloadedError( argc,
|
2789
|
+
Ruby_Format_OverloadedError( argc, 4, "File.new",
|
2790
|
+
" File.new(TagLib::FileName file, bool readProperties, TagLib::RIFF::AIFF::Properties::ReadStyle propertiesStyle, TagLib::ID3v2::FrameFactory *frameFactory)\n"
|
2738
2791
|
" File.new(TagLib::FileName file, bool readProperties, TagLib::RIFF::AIFF::Properties::ReadStyle propertiesStyle)\n"
|
2739
2792
|
" File.new(TagLib::FileName file, bool readProperties)\n"
|
2740
2793
|
" File.new(TagLib::FileName file)\n");
|
@@ -2792,7 +2845,7 @@ fail:
|
|
2792
2845
|
|
2793
2846
|
|
2794
2847
|
SWIGINTERN VALUE
|
2795
|
-
|
2848
|
+
_wrap_File_save__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
2796
2849
|
TagLib::RIFF::AIFF::File *arg1 = (TagLib::RIFF::AIFF::File *) 0 ;
|
2797
2850
|
void *argp1 = 0 ;
|
2798
2851
|
int res1 = 0 ;
|
@@ -2815,6 +2868,88 @@ fail:
|
|
2815
2868
|
}
|
2816
2869
|
|
2817
2870
|
|
2871
|
+
SWIGINTERN VALUE
|
2872
|
+
_wrap_File_save__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
2873
|
+
TagLib::RIFF::AIFF::File *arg1 = (TagLib::RIFF::AIFF::File *) 0 ;
|
2874
|
+
TagLib::ID3v2::Version arg2 ;
|
2875
|
+
void *argp1 = 0 ;
|
2876
|
+
int res1 = 0 ;
|
2877
|
+
void *argp2 ;
|
2878
|
+
int res2 = 0 ;
|
2879
|
+
bool result;
|
2880
|
+
VALUE vresult = Qnil;
|
2881
|
+
|
2882
|
+
if ((argc < 1) || (argc > 1)) {
|
2883
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2884
|
+
}
|
2885
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__AIFF__File, 0 | 0 );
|
2886
|
+
if (!SWIG_IsOK(res1)) {
|
2887
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::AIFF::File *","save", 1, self ));
|
2888
|
+
}
|
2889
|
+
arg1 = reinterpret_cast< TagLib::RIFF::AIFF::File * >(argp1);
|
2890
|
+
{
|
2891
|
+
res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_TagLib__ID3v2__Version, 0 );
|
2892
|
+
if (!SWIG_IsOK(res2)) {
|
2893
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::ID3v2::Version","save", 2, argv[0] ));
|
2894
|
+
}
|
2895
|
+
if (!argp2) {
|
2896
|
+
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "TagLib::ID3v2::Version","save", 2, argv[0]));
|
2897
|
+
} else {
|
2898
|
+
arg2 = *(reinterpret_cast< TagLib::ID3v2::Version * >(argp2));
|
2899
|
+
}
|
2900
|
+
}
|
2901
|
+
result = (bool)(arg1)->save(arg2);
|
2902
|
+
vresult = SWIG_From_bool(static_cast< bool >(result));
|
2903
|
+
return vresult;
|
2904
|
+
fail:
|
2905
|
+
return Qnil;
|
2906
|
+
}
|
2907
|
+
|
2908
|
+
|
2909
|
+
SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) {
|
2910
|
+
int argc;
|
2911
|
+
VALUE argv[3];
|
2912
|
+
int ii;
|
2913
|
+
|
2914
|
+
argc = nargs + 1;
|
2915
|
+
argv[0] = self;
|
2916
|
+
if (argc > 3) SWIG_fail;
|
2917
|
+
for (ii = 1; (ii < argc); ++ii) {
|
2918
|
+
argv[ii] = args[ii-1];
|
2919
|
+
}
|
2920
|
+
if (argc == 1) {
|
2921
|
+
int _v = 0;
|
2922
|
+
void *vptr = 0;
|
2923
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__RIFF__AIFF__File, 0);
|
2924
|
+
_v = SWIG_CheckState(res);
|
2925
|
+
if (_v) {
|
2926
|
+
return _wrap_File_save__SWIG_0(nargs, args, self);
|
2927
|
+
}
|
2928
|
+
}
|
2929
|
+
if (argc == 2) {
|
2930
|
+
int _v = 0;
|
2931
|
+
void *vptr = 0;
|
2932
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__RIFF__AIFF__File, 0);
|
2933
|
+
_v = SWIG_CheckState(res);
|
2934
|
+
if (_v) {
|
2935
|
+
void *vptr = 0;
|
2936
|
+
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_TagLib__ID3v2__Version, SWIG_POINTER_NO_NULL);
|
2937
|
+
_v = SWIG_CheckState(res);
|
2938
|
+
if (_v) {
|
2939
|
+
return _wrap_File_save__SWIG_1(nargs, args, self);
|
2940
|
+
}
|
2941
|
+
}
|
2942
|
+
}
|
2943
|
+
|
2944
|
+
fail:
|
2945
|
+
Ruby_Format_OverloadedError( argc, 3, "File.save",
|
2946
|
+
" bool File.save()\n"
|
2947
|
+
" bool File.save(TagLib::ID3v2::Version version)\n");
|
2948
|
+
|
2949
|
+
return Qnil;
|
2950
|
+
}
|
2951
|
+
|
2952
|
+
|
2818
2953
|
SWIGINTERN VALUE
|
2819
2954
|
_wrap_File_id3v2_tagq___(int argc, VALUE *argv, VALUE self) {
|
2820
2955
|
TagLib::RIFF::AIFF::File *arg1 = (TagLib::RIFF::AIFF::File *) 0 ;
|
@@ -2866,11 +3001,25 @@ fail:
|
|
2866
3001
|
static void *_p_TagLib__RIFF__AIFF__PropertiesTo_p_TagLib__AudioProperties(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
2867
3002
|
return (void *)((TagLib::AudioProperties *) ((TagLib::RIFF::AIFF::Properties *) x));
|
2868
3003
|
}
|
3004
|
+
static void *_p_TagLib__RIFF__AIFF__FileTo_p_TagLib__File(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
3005
|
+
return (void *)((TagLib::File *) (TagLib::RIFF::File *) ((TagLib::RIFF::AIFF::File *) x));
|
3006
|
+
}
|
3007
|
+
static void *_p_TagLib__RIFF__FileTo_p_TagLib__File(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
3008
|
+
return (void *)((TagLib::File *) ((TagLib::RIFF::File *) x));
|
3009
|
+
}
|
3010
|
+
static void *_p_TagLib__RIFF__AIFF__FileTo_p_TagLib__RIFF__File(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
3011
|
+
return (void *)((TagLib::RIFF::File *) ((TagLib::RIFF::AIFF::File *) x));
|
3012
|
+
}
|
2869
3013
|
static swig_type_info _swigt__p_TagLib__AudioProperties = {"_p_TagLib__AudioProperties", "TagLib::AudioProperties *", 0, 0, (void*)0, 0};
|
3014
|
+
static swig_type_info _swigt__p_TagLib__File = {"_p_TagLib__File", "TagLib::File *", 0, 0, (void*)0, 0};
|
3015
|
+
static swig_type_info _swigt__p_TagLib__ID3v2__FrameFactory = {"_p_TagLib__ID3v2__FrameFactory", "TagLib::ID3v2::FrameFactory *", 0, 0, (void*)0, 0};
|
2870
3016
|
static swig_type_info _swigt__p_TagLib__ID3v2__Tag = {"_p_TagLib__ID3v2__Tag", "TagLib::ID3v2::Tag *", 0, 0, (void*)0, 0};
|
3017
|
+
static swig_type_info _swigt__p_TagLib__ID3v2__Version = {"_p_TagLib__ID3v2__Version", "TagLib::ID3v2::Version *", 0, 0, (void*)0, 0};
|
2871
3018
|
static swig_type_info _swigt__p_TagLib__RIFF__AIFF__File = {"_p_TagLib__RIFF__AIFF__File", "TagLib::RIFF::AIFF::File *", 0, 0, (void*)0, 0};
|
2872
3019
|
static swig_type_info _swigt__p_TagLib__RIFF__AIFF__Properties = {"_p_TagLib__RIFF__AIFF__Properties", "TagLib::RIFF::AIFF::Properties *", 0, 0, (void*)0, 0};
|
3020
|
+
static swig_type_info _swigt__p_TagLib__RIFF__File = {"_p_TagLib__RIFF__File", "TagLib::RIFF::File *", 0, 0, (void*)0, 0};
|
2873
3021
|
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
|
3022
|
+
static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0};
|
2874
3023
|
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0};
|
2875
3024
|
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0};
|
2876
3025
|
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0};
|
@@ -2878,10 +3027,15 @@ static swig_type_info _swigt__p_wchar_t = {"_p_wchar_t", "TagLib::wchar *|wchar_
|
|
2878
3027
|
|
2879
3028
|
static swig_type_info *swig_type_initial[] = {
|
2880
3029
|
&_swigt__p_TagLib__AudioProperties,
|
3030
|
+
&_swigt__p_TagLib__File,
|
3031
|
+
&_swigt__p_TagLib__ID3v2__FrameFactory,
|
2881
3032
|
&_swigt__p_TagLib__ID3v2__Tag,
|
3033
|
+
&_swigt__p_TagLib__ID3v2__Version,
|
2882
3034
|
&_swigt__p_TagLib__RIFF__AIFF__File,
|
2883
3035
|
&_swigt__p_TagLib__RIFF__AIFF__Properties,
|
3036
|
+
&_swigt__p_TagLib__RIFF__File,
|
2884
3037
|
&_swigt__p_char,
|
3038
|
+
&_swigt__p_long_long,
|
2885
3039
|
&_swigt__p_unsigned_char,
|
2886
3040
|
&_swigt__p_unsigned_int,
|
2887
3041
|
&_swigt__p_unsigned_long,
|
@@ -2889,10 +3043,15 @@ static swig_type_info *swig_type_initial[] = {
|
|
2889
3043
|
};
|
2890
3044
|
|
2891
3045
|
static swig_cast_info _swigc__p_TagLib__AudioProperties[] = { {&_swigt__p_TagLib__AudioProperties, 0, 0, 0}, {&_swigt__p_TagLib__RIFF__AIFF__Properties, _p_TagLib__RIFF__AIFF__PropertiesTo_p_TagLib__AudioProperties, 0, 0},{0, 0, 0, 0}};
|
3046
|
+
static swig_cast_info _swigc__p_TagLib__File[] = { {&_swigt__p_TagLib__File, 0, 0, 0}, {&_swigt__p_TagLib__RIFF__AIFF__File, _p_TagLib__RIFF__AIFF__FileTo_p_TagLib__File, 0, 0}, {&_swigt__p_TagLib__RIFF__File, _p_TagLib__RIFF__FileTo_p_TagLib__File, 0, 0},{0, 0, 0, 0}};
|
3047
|
+
static swig_cast_info _swigc__p_TagLib__ID3v2__FrameFactory[] = { {&_swigt__p_TagLib__ID3v2__FrameFactory, 0, 0, 0},{0, 0, 0, 0}};
|
2892
3048
|
static swig_cast_info _swigc__p_TagLib__ID3v2__Tag[] = { {&_swigt__p_TagLib__ID3v2__Tag, 0, 0, 0},{0, 0, 0, 0}};
|
3049
|
+
static swig_cast_info _swigc__p_TagLib__ID3v2__Version[] = { {&_swigt__p_TagLib__ID3v2__Version, 0, 0, 0},{0, 0, 0, 0}};
|
2893
3050
|
static swig_cast_info _swigc__p_TagLib__RIFF__AIFF__File[] = { {&_swigt__p_TagLib__RIFF__AIFF__File, 0, 0, 0},{0, 0, 0, 0}};
|
2894
3051
|
static swig_cast_info _swigc__p_TagLib__RIFF__AIFF__Properties[] = { {&_swigt__p_TagLib__RIFF__AIFF__Properties, 0, 0, 0},{0, 0, 0, 0}};
|
3052
|
+
static swig_cast_info _swigc__p_TagLib__RIFF__File[] = { {&_swigt__p_TagLib__RIFF__File, 0, 0, 0}, {&_swigt__p_TagLib__RIFF__AIFF__File, _p_TagLib__RIFF__AIFF__FileTo_p_TagLib__RIFF__File, 0, 0},{0, 0, 0, 0}};
|
2895
3053
|
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
|
3054
|
+
static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
|
2896
3055
|
static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
|
2897
3056
|
static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
|
2898
3057
|
static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
|
@@ -2900,10 +3059,15 @@ static swig_cast_info _swigc__p_wchar_t[] = { {&_swigt__p_wchar_t, 0, 0, 0},{0,
|
|
2900
3059
|
|
2901
3060
|
static swig_cast_info *swig_cast_initial[] = {
|
2902
3061
|
_swigc__p_TagLib__AudioProperties,
|
3062
|
+
_swigc__p_TagLib__File,
|
3063
|
+
_swigc__p_TagLib__ID3v2__FrameFactory,
|
2903
3064
|
_swigc__p_TagLib__ID3v2__Tag,
|
3065
|
+
_swigc__p_TagLib__ID3v2__Version,
|
2904
3066
|
_swigc__p_TagLib__RIFF__AIFF__File,
|
2905
3067
|
_swigc__p_TagLib__RIFF__AIFF__Properties,
|
3068
|
+
_swigc__p_TagLib__RIFF__File,
|
2906
3069
|
_swigc__p_char,
|
3070
|
+
_swigc__p_long_long,
|
2907
3071
|
_swigc__p_unsigned_char,
|
2908
3072
|
_swigc__p_unsigned_int,
|
2909
3073
|
_swigc__p_unsigned_long,
|
@@ -3173,7 +3337,6 @@ SWIGEXPORT void Init_taglib_aiff(void) {
|
|
3173
3337
|
SWIG_TypeClientData(SWIGTYPE_p_TagLib__RIFF__AIFF__Properties, (void *) &SwigClassProperties);
|
3174
3338
|
rb_define_alloc_func(SwigClassProperties.klass, _wrap_Properties_allocate);
|
3175
3339
|
rb_define_method(SwigClassProperties.klass, "initialize", VALUEFUNC(_wrap_new_Properties), -1);
|
3176
|
-
rb_define_method(SwigClassProperties.klass, "length_in_seconds", VALUEFUNC(_wrap_Properties_length_in_seconds), -1);
|
3177
3340
|
rb_define_method(SwigClassProperties.klass, "length_in_milliseconds", VALUEFUNC(_wrap_Properties_length_in_milliseconds), -1);
|
3178
3341
|
rb_define_method(SwigClassProperties.klass, "bitrate", VALUEFUNC(_wrap_Properties_bitrate), -1);
|
3179
3342
|
rb_define_method(SwigClassProperties.klass, "sample_rate", VALUEFUNC(_wrap_Properties_sample_rate), -1);
|