taglib-ruby 1.1.2 → 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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +1 -0
  3. data/CHANGELOG.md +22 -0
  4. data/README.md +16 -12
  5. data/docs/taglib/mpeg.rb +1 -9
  6. data/ext/extconf_common.rb +21 -12
  7. data/ext/taglib_aiff/taglib_aiff.i +5 -0
  8. data/ext/taglib_aiff/taglib_aiff_wrap.cxx +327 -111
  9. data/ext/taglib_base/includes.i +14 -14
  10. data/ext/taglib_base/taglib_base.i +37 -4
  11. data/ext/taglib_base/taglib_base_wrap.cxx +414 -422
  12. data/ext/taglib_flac/taglib_flac.i +8 -3
  13. data/ext/taglib_flac/taglib_flac_wrap.cxx +356 -406
  14. data/ext/taglib_flac_picture/taglib_flac_picture.i +4 -0
  15. data/ext/taglib_flac_picture/taglib_flac_picture_wrap.cxx +229 -122
  16. data/ext/taglib_id3v1/taglib_id3v1_wrap.cxx +196 -102
  17. data/ext/taglib_id3v2/taglib_id3v2.i +5 -0
  18. data/ext/taglib_id3v2/taglib_id3v2_wrap.cxx +727 -568
  19. data/ext/taglib_mp4/taglib_mp4.i +22 -18
  20. data/ext/taglib_mp4/taglib_mp4_wrap.cxx +2141 -1493
  21. data/ext/taglib_mpeg/taglib_mpeg.i +6 -0
  22. data/ext/taglib_mpeg/taglib_mpeg_wrap.cxx +546 -379
  23. data/ext/taglib_ogg/taglib_ogg.i +0 -2
  24. data/ext/taglib_ogg/taglib_ogg_wrap.cxx +162 -107
  25. data/ext/taglib_vorbis/taglib_vorbis.i +1 -0
  26. data/ext/taglib_vorbis/taglib_vorbis_wrap.cxx +141 -109
  27. data/ext/taglib_wav/taglib_wav.i +6 -2
  28. data/ext/taglib_wav/taglib_wav_wrap.cxx +290 -147
  29. data/lib/taglib/version.rb +3 -3
  30. data/taglib-ruby.gemspec +1 -0
  31. data/tasks/ext.rake +23 -39
  32. data/tasks/swig.rake +14 -4
  33. data/test/id3v2_write_test.rb +1 -1
  34. data/test/wav_examples_test.rb +1 -1
  35. data/test/wav_file_test.rb +1 -1
  36. data/test/wav_file_write_test.rb +6 -6
  37. metadata +4 -3
@@ -1,45 +1,17 @@
1
1
  /* ----------------------------------------------------------------------------
2
- * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 4.0.2
2
+ * This file was automatically generated by SWIG (https://www.swig.org).
3
+ * Version 4.1.1
4
4
  *
5
- * This file is not intended to be easily readable and contains a number of
6
- * coding conventions designed to improve portability and efficiency. Do not make
7
- * changes to this file unless you know what you are doing--modify the SWIG
8
- * interface file instead.
5
+ * Do not make changes to this file unless you know what you are doing - modify
6
+ * the SWIG interface file instead.
9
7
  * ----------------------------------------------------------------------------- */
10
8
 
11
9
  static void free_taglib_mpeg_file(void *ptr);
12
10
 
13
11
 
14
12
 
15
- #ifndef SWIGRUBY
13
+ #define SWIG_VERSION 0x040101
16
14
  #define SWIGRUBY
17
- #endif
18
-
19
-
20
-
21
- #ifdef __cplusplus
22
- /* SwigValueWrapper is described in swig.swg */
23
- template<typename T> class SwigValueWrapper {
24
- struct SwigMovePointer {
25
- T *ptr;
26
- SwigMovePointer(T *p) : ptr(p) { }
27
- ~SwigMovePointer() { delete ptr; }
28
- SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
29
- } pointer;
30
- SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
31
- SwigValueWrapper(const SwigValueWrapper<T>& rhs);
32
- public:
33
- SwigValueWrapper() : pointer(0) { }
34
- SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
35
- operator T&() const { return *pointer.ptr; }
36
- T *operator&() { return pointer.ptr; }
37
- };
38
-
39
- template <typename T> T SwigValueInit() {
40
- return T();
41
- }
42
- #endif
43
15
 
44
16
  /* -----------------------------------------------------------------------------
45
17
  * This section contains generic SWIG labels for method/variable
@@ -335,6 +307,8 @@ template <typename T> T SwigValueInit() {
335
307
  #define SWIG_POINTER_DISOWN 0x1
336
308
  #define SWIG_CAST_NEW_MEMORY 0x2
337
309
  #define SWIG_POINTER_NO_NULL 0x4
310
+ #define SWIG_POINTER_CLEAR 0x8
311
+ #define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
338
312
 
339
313
  /* Flags for new pointer objects */
340
314
  #define SWIG_POINTER_OWN 0x1
@@ -406,7 +380,7 @@ template <typename T> T SwigValueInit() {
406
380
  SWIG errors code.
407
381
 
408
382
  Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
409
- allows to return the 'cast rank', for example, if you have this
383
+ allows returning the 'cast rank', for example, if you have this
410
384
 
411
385
  int food(double)
412
386
  int fooi(int);
@@ -420,7 +394,13 @@ template <typename T> T SwigValueInit() {
420
394
  */
421
395
 
422
396
  #define SWIG_OK (0)
397
+ /* Runtime errors are < 0 */
423
398
  #define SWIG_ERROR (-1)
399
+ /* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
400
+ /* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
401
+ /* Errors < -200 are generic runtime specific errors */
402
+ #define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
403
+
424
404
  #define SWIG_IsOK(r) (r >= 0)
425
405
  #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
426
406
 
@@ -435,7 +415,7 @@ template <typename T> T SwigValueInit() {
435
415
  #define SWIG_OLDOBJ (SWIG_OK)
436
416
  #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
437
417
  #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
438
- /* Check, add and del mask methods */
418
+ /* Check, add and del object mask methods */
439
419
  #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
440
420
  #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
441
421
  #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
@@ -581,7 +561,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
581
561
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
582
562
  */
583
563
  SWIGRUNTIME swig_cast_info *
584
- SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
564
+ SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty) {
585
565
  if (ty) {
586
566
  swig_cast_info *iter = ty->cast;
587
567
  while (iter) {
@@ -641,9 +621,9 @@ SWIG_TypeName(const swig_type_info *ty) {
641
621
  SWIGRUNTIME const char *
642
622
  SWIG_TypePrettyName(const swig_type_info *type) {
643
623
  /* The "str" field contains the equivalent pretty names of the
644
- type, separated by vertical-bar characters. We choose
645
- to print the last name, as it is often (?) the most
646
- specific. */
624
+ type, separated by vertical-bar characters. Choose the last
625
+ name. It should be the most specific; a fully resolved name
626
+ but not necessarily with default template parameters expanded. */
647
627
  if (!type) return NULL;
648
628
  if (type->str != NULL) {
649
629
  const char *last_name = type->str;
@@ -863,7 +843,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
863
843
  }
864
844
  #endif
865
845
 
866
- /* Errors in SWIG */
846
+ /* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
867
847
  #define SWIG_UnknownError -1
868
848
  #define SWIG_IOError -2
869
849
  #define SWIG_RuntimeError -3
@@ -879,9 +859,25 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
879
859
  #define SWIG_NullReferenceError -13
880
860
 
881
861
 
862
+ #if __GNUC__ >= 7
863
+ #pragma GCC diagnostic push
864
+ #if defined(__cplusplus)
865
+ #pragma GCC diagnostic ignored "-Wregister"
866
+ #if __GNUC__ >= 10
867
+ #pragma GCC diagnostic ignored "-Wvolatile"
868
+ #if __GNUC__ >= 11
869
+ #pragma GCC diagnostic ignored "-Wdeprecated-enum-enum-conversion"
870
+ #endif
871
+ #endif
872
+ #endif
873
+ #endif
882
874
 
883
875
  #include <ruby.h>
884
876
 
877
+ #if __GNUC__ >= 7
878
+ #pragma GCC diagnostic pop
879
+ #endif
880
+
885
881
  /* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
886
882
  * breaks using rb_intern as an lvalue, as SWIG does. We work around this
887
883
  * issue for now by disabling this.
@@ -1661,6 +1657,11 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1661
1657
  own->own = 0;
1662
1658
  }
1663
1659
 
1660
+ if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE)) {
1661
+ if (!RDATA(obj)->dfree)
1662
+ return SWIG_ERROR_RELEASE_NOT_OWNED;
1663
+ }
1664
+
1664
1665
  /* Check to see if the input object is giving up ownership
1665
1666
  of the underlying C struct or C++ object. If so then we
1666
1667
  need to reset the destructor since the Ruby object no
@@ -1672,7 +1673,7 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1672
1673
  swig_class *sklass = (swig_class *) ty->clientdata;
1673
1674
  track = sklass->trackObjects;
1674
1675
  }
1675
-
1676
+
1676
1677
  if (track) {
1677
1678
  /* We are tracking objects for this class. Thus we change the destructor
1678
1679
  * to SWIG_RubyRemoveTracking. This allows us to
@@ -1686,6 +1687,10 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1686
1687
  }
1687
1688
  }
1688
1689
 
1690
+ if (flags & SWIG_POINTER_CLEAR) {
1691
+ DATA_PTR(obj) = 0;
1692
+ }
1693
+
1689
1694
  /* Do type-checking if type info was provided */
1690
1695
  if (ty) {
1691
1696
  if (ty->clientdata) {
@@ -1793,6 +1798,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
1793
1798
  {
1794
1799
  /* register a new class */
1795
1800
  VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
1801
+ rb_undef_alloc_func(cl);
1796
1802
  /* create and store the structure pointer to a global variable */
1797
1803
  swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
1798
1804
  rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
@@ -1823,7 +1829,7 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
1823
1829
  {
1824
1830
  if ( rb_respond_to( proc, swig_arity_id ) )
1825
1831
  {
1826
- VALUE num = rb_funcall( proc, swig_arity_id, 0 );
1832
+ VALUE num = rb_funcall2( proc, swig_arity_id, 0, 0 );
1827
1833
  int arity = NUM2INT(num);
1828
1834
  if ( arity < 0 && (arity+1) < -minimal ) return 1;
1829
1835
  if ( arity == minimal ) return 1;
@@ -1841,7 +1847,7 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
1841
1847
 
1842
1848
  #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1843
1849
 
1844
- #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1850
+ #define SWIG_contract_assert(expr, msg) do { if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } } while (0)
1845
1851
 
1846
1852
 
1847
1853
 
@@ -1859,12 +1865,13 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
1859
1865
  #define SWIGTYPE_p_TagLib__MPEG__XingHeader swig_types[9]
1860
1866
  #define SWIGTYPE_p_TagLib__Tag swig_types[10]
1861
1867
  #define SWIGTYPE_p_char swig_types[11]
1862
- #define SWIGTYPE_p_unsigned_char swig_types[12]
1863
- #define SWIGTYPE_p_unsigned_int swig_types[13]
1864
- #define SWIGTYPE_p_unsigned_long swig_types[14]
1865
- #define SWIGTYPE_p_wchar_t swig_types[15]
1866
- static swig_type_info *swig_types[17];
1867
- static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0};
1868
+ #define SWIGTYPE_p_long_long swig_types[12]
1869
+ #define SWIGTYPE_p_unsigned_char swig_types[13]
1870
+ #define SWIGTYPE_p_unsigned_int swig_types[14]
1871
+ #define SWIGTYPE_p_unsigned_long swig_types[15]
1872
+ #define SWIGTYPE_p_wchar_t swig_types[16]
1873
+ static swig_type_info *swig_types[18];
1874
+ static swig_module_info swig_module = {swig_types, 17, 0, 0, 0, 0};
1868
1875
  #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1869
1876
  #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1870
1877
 
@@ -1875,12 +1882,56 @@ static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0};
1875
1882
 
1876
1883
  static VALUE mMPEG;
1877
1884
 
1878
- #define SWIG_RUBY_THREAD_BEGIN_BLOCK
1879
- #define SWIG_RUBY_THREAD_END_BLOCK
1885
+ #ifdef __cplusplus
1886
+ #include <utility>
1887
+ /* SwigValueWrapper is described in swig.swg */
1888
+ template<typename T> class SwigValueWrapper {
1889
+ struct SwigSmartPointer {
1890
+ T *ptr;
1891
+ SwigSmartPointer(T *p) : ptr(p) { }
1892
+ ~SwigSmartPointer() { delete ptr; }
1893
+ SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
1894
+ void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; }
1895
+ } pointer;
1896
+ SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
1897
+ SwigValueWrapper(const SwigValueWrapper<T>& rhs);
1898
+ public:
1899
+ SwigValueWrapper() : pointer(0) { }
1900
+ SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
1901
+ #if __cplusplus >=201103L
1902
+ SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
1903
+ operator T&&() const { return std::move(*pointer.ptr); }
1904
+ #else
1905
+ operator T&() const { return *pointer.ptr; }
1906
+ #endif
1907
+ T *operator&() const { return pointer.ptr; }
1908
+ static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); }
1909
+ };
1880
1910
 
1911
+ /*
1912
+ * SwigValueInit() is a generic initialisation solution as the following approach:
1913
+ *
1914
+ * T c_result = T();
1915
+ *
1916
+ * doesn't compile for all types for example:
1917
+ *
1918
+ * unsigned int c_result = unsigned int();
1919
+ */
1920
+ template <typename T> T SwigValueInit() {
1921
+ return T();
1922
+ }
1881
1923
 
1882
- #define SWIGVERSION 0x040002
1883
- #define SWIG_VERSION SWIGVERSION
1924
+ #if __cplusplus >=201103L
1925
+ # define SWIG_STD_MOVE(OBJ) std::move(OBJ)
1926
+ #else
1927
+ # define SWIG_STD_MOVE(OBJ) OBJ
1928
+ #endif
1929
+
1930
+ #endif
1931
+
1932
+
1933
+ #define SWIG_RUBY_THREAD_BEGIN_BLOCK
1934
+ #define SWIG_RUBY_THREAD_END_BLOCK
1884
1935
 
1885
1936
 
1886
1937
  #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
@@ -1916,34 +1967,26 @@ static VALUE mMPEG;
1916
1967
  #endif
1917
1968
 
1918
1969
  VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) {
1919
- if (byteVector.isNull()) {
1920
- return Qnil;
1921
- } else {
1922
- return rb_str_new(byteVector.data(), byteVector.size());
1923
- }
1970
+ return rb_str_new(byteVector.data(), byteVector.size());
1924
1971
  }
1925
1972
 
1926
1973
  TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) {
1927
1974
  if (NIL_P(s)) {
1928
- return TagLib::ByteVector::null;
1975
+ return TagLib::ByteVector();
1929
1976
  } else {
1930
1977
  return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s));
1931
1978
  }
1932
1979
  }
1933
1980
 
1934
1981
  VALUE taglib_string_to_ruby_string(const TagLib::String & string) {
1935
- if (string.isNull()) {
1936
- return Qnil;
1937
- } else {
1938
- VALUE result = rb_str_new2(string.toCString(true));
1939
- ASSOCIATE_UTF8_ENCODING(result);
1940
- return result;
1941
- }
1982
+ VALUE result = rb_str_new2(string.toCString(true));
1983
+ ASSOCIATE_UTF8_ENCODING(result);
1984
+ return result;
1942
1985
  }
1943
1986
 
1944
1987
  TagLib::String ruby_string_to_taglib_string(VALUE s) {
1945
1988
  if (NIL_P(s)) {
1946
- return TagLib::String::null;
1989
+ return TagLib::String();
1947
1990
  } else {
1948
1991
  return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8);
1949
1992
  }
@@ -2032,6 +2075,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
2032
2075
  #endif
2033
2076
  }
2034
2077
 
2078
+ VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) {
2079
+ #ifdef _WIN32
2080
+ return LL2NUM(off);
2081
+ #else
2082
+ return OFFT2NUM(off);
2083
+ #endif
2084
+ }
2035
2085
 
2036
2086
 
2037
2087
  #include <limits.h>
@@ -2132,7 +2182,44 @@ SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2))
2132
2182
  }
2133
2183
 
2134
2184
 
2135
- /*@SWIG:/usr/local/Cellar/swig/4.0.2/share/swig/4.0.2/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2185
+ #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
2186
+ # define SWIG_LONG_LONG_AVAILABLE
2187
+ #endif
2188
+
2189
+
2190
+ #ifdef SWIG_LONG_LONG_AVAILABLE
2191
+ /*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2192
+ SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE arg)
2193
+ {
2194
+ VALUE *args = (VALUE *)arg;
2195
+ VALUE obj = args[0];
2196
+ VALUE type = TYPE(obj);
2197
+ long long *res = (long long *)(args[1]);
2198
+ *res = type == T_FIXNUM ? NUM2LL(obj) : rb_big2ll(obj);
2199
+ return obj;
2200
+ }
2201
+ /*@SWIG@*/
2202
+
2203
+ SWIGINTERN int
2204
+ SWIG_AsVal_long_SS_long (VALUE obj, long long *val)
2205
+ {
2206
+ VALUE type = TYPE(obj);
2207
+ if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
2208
+ long long v;
2209
+ VALUE a[2];
2210
+ a[0] = obj;
2211
+ a[1] = (VALUE)(&v);
2212
+ if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
2213
+ if (val) *val = v;
2214
+ return SWIG_OK;
2215
+ }
2216
+ }
2217
+ return SWIG_TypeError;
2218
+ }
2219
+ #endif
2220
+
2221
+
2222
+ /*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2136
2223
  SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg)
2137
2224
  {
2138
2225
  VALUE *args = (VALUE *)arg;
@@ -2383,70 +2470,16 @@ fail:
2383
2470
  }
2384
2471
 
2385
2472
 
2386
- SWIGINTERN VALUE
2387
- _wrap_XingHeader_xing_header_offset(int argc, VALUE *argv, VALUE self) {
2388
- TagLib::MPEG::Header::Version arg1 ;
2389
- TagLib::MPEG::Header::ChannelMode arg2 ;
2390
- int val1 ;
2391
- int ecode1 = 0 ;
2392
- int val2 ;
2393
- int ecode2 = 0 ;
2394
- int result;
2395
- VALUE vresult = Qnil;
2396
-
2397
- if ((argc < 2) || (argc > 2)) {
2398
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2399
- }
2400
- ecode1 = SWIG_AsVal_int(argv[0], &val1);
2401
- if (!SWIG_IsOK(ecode1)) {
2402
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header::Version","TagLib::MPEG::XingHeader::xingHeaderOffset", 1, argv[0] ));
2403
- }
2404
- arg1 = static_cast< TagLib::MPEG::Header::Version >(val1);
2405
- ecode2 = SWIG_AsVal_int(argv[1], &val2);
2406
- if (!SWIG_IsOK(ecode2)) {
2407
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::MPEG::Header::ChannelMode","TagLib::MPEG::XingHeader::xingHeaderOffset", 2, argv[1] ));
2408
- }
2409
- arg2 = static_cast< TagLib::MPEG::Header::ChannelMode >(val2);
2410
- result = (int)TagLib::MPEG::XingHeader::xingHeaderOffset(arg1,arg2);
2411
- vresult = SWIG_From_int(static_cast< int >(result));
2412
- return vresult;
2413
- fail:
2414
- return Qnil;
2415
- }
2416
-
2417
-
2418
2473
  static swig_class SwigClassHeader;
2419
2474
 
2420
2475
  SWIGINTERN VALUE
2421
2476
  _wrap_new_Header__SWIG_0(int argc, VALUE *argv, VALUE self) {
2422
- TagLib::ByteVector *arg1 = 0 ;
2423
- TagLib::ByteVector tmp1 ;
2424
- TagLib::MPEG::Header *result = 0 ;
2425
-
2426
- if ((argc < 1) || (argc > 1)) {
2427
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2428
- }
2429
- {
2430
- tmp1 = ruby_string_to_taglib_bytevector(argv[0]);
2431
- arg1 = &tmp1;
2432
- }
2433
- result = (TagLib::MPEG::Header *)new TagLib::MPEG::Header((TagLib::ByteVector const &)*arg1);
2434
- DATA_PTR(self) = result;
2435
- SWIG_RubyAddTracking(result, self);
2436
- return self;
2437
- fail:
2438
- return Qnil;
2439
- }
2440
-
2441
-
2442
- SWIGINTERN VALUE
2443
- _wrap_new_Header__SWIG_1(int argc, VALUE *argv, VALUE self) {
2444
- TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
2445
- long arg2 ;
2477
+ TagLib::File *arg1 = (TagLib::File *) 0 ;
2478
+ TagLib::offset_t arg2 ;
2446
2479
  bool arg3 ;
2447
2480
  void *argp1 = 0 ;
2448
2481
  int res1 = 0 ;
2449
- long val2 ;
2482
+ long long val2 ;
2450
2483
  int ecode2 = 0 ;
2451
2484
  bool val3 ;
2452
2485
  int ecode3 = 0 ;
@@ -2455,16 +2488,16 @@ _wrap_new_Header__SWIG_1(int argc, VALUE *argv, VALUE self) {
2455
2488
  if ((argc < 3) || (argc > 3)) {
2456
2489
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2457
2490
  }
2458
- res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 );
2491
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__File, 0 | 0 );
2459
2492
  if (!SWIG_IsOK(res1)) {
2460
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","Header", 1, argv[0] ));
2493
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","Header", 1, argv[0] ));
2461
2494
  }
2462
- arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1);
2463
- ecode2 = SWIG_AsVal_long(argv[1], &val2);
2495
+ arg1 = reinterpret_cast< TagLib::File * >(argp1);
2496
+ ecode2 = SWIG_AsVal_long_SS_long(argv[1], &val2);
2464
2497
  if (!SWIG_IsOK(ecode2)) {
2465
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","Header", 2, argv[1] ));
2498
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","Header", 2, argv[1] ));
2466
2499
  }
2467
- arg2 = static_cast< long >(val2);
2500
+ arg2 = static_cast< TagLib::offset_t >(val2);
2468
2501
  ecode3 = SWIG_AsVal_bool(argv[2], &val3);
2469
2502
  if (!SWIG_IsOK(ecode3)) {
2470
2503
  SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","Header", 3, argv[2] ));
@@ -2480,28 +2513,28 @@ fail:
2480
2513
 
2481
2514
 
2482
2515
  SWIGINTERN VALUE
2483
- _wrap_new_Header__SWIG_2(int argc, VALUE *argv, VALUE self) {
2484
- TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
2485
- long arg2 ;
2516
+ _wrap_new_Header__SWIG_1(int argc, VALUE *argv, VALUE self) {
2517
+ TagLib::File *arg1 = (TagLib::File *) 0 ;
2518
+ TagLib::offset_t arg2 ;
2486
2519
  void *argp1 = 0 ;
2487
2520
  int res1 = 0 ;
2488
- long val2 ;
2521
+ long long val2 ;
2489
2522
  int ecode2 = 0 ;
2490
2523
  TagLib::MPEG::Header *result = 0 ;
2491
2524
 
2492
2525
  if ((argc < 2) || (argc > 2)) {
2493
2526
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2494
2527
  }
2495
- res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 );
2528
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__File, 0 | 0 );
2496
2529
  if (!SWIG_IsOK(res1)) {
2497
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","Header", 1, argv[0] ));
2530
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::File *","Header", 1, argv[0] ));
2498
2531
  }
2499
- arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1);
2500
- ecode2 = SWIG_AsVal_long(argv[1], &val2);
2532
+ arg1 = reinterpret_cast< TagLib::File * >(argp1);
2533
+ ecode2 = SWIG_AsVal_long_SS_long(argv[1], &val2);
2501
2534
  if (!SWIG_IsOK(ecode2)) {
2502
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","Header", 2, argv[1] ));
2535
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","Header", 2, argv[1] ));
2503
2536
  }
2504
- arg2 = static_cast< long >(val2);
2537
+ arg2 = static_cast< TagLib::offset_t >(val2);
2505
2538
  result = (TagLib::MPEG::Header *)new TagLib::MPEG::Header(arg1,arg2);
2506
2539
  DATA_PTR(self) = result;
2507
2540
  SWIG_RubyAddTracking(result, self);
@@ -2527,9 +2560,9 @@ _wrap_Header_allocate(int argc, VALUE *argv, VALUE self)
2527
2560
 
2528
2561
 
2529
2562
  SWIGINTERN VALUE
2530
- _wrap_new_Header__SWIG_3(int argc, VALUE *argv, VALUE self) {
2563
+ _wrap_new_Header__SWIG_2(int argc, VALUE *argv, VALUE self) {
2531
2564
  TagLib::MPEG::Header *arg1 = 0 ;
2532
- void *argp1 ;
2565
+ void *argp1 = 0 ;
2533
2566
  int res1 = 0 ;
2534
2567
  TagLib::MPEG::Header *result = 0 ;
2535
2568
 
@@ -2564,45 +2597,37 @@ SWIGINTERN VALUE _wrap_new_Header(int nargs, VALUE *args, VALUE self) {
2564
2597
  argv[ii] = args[ii];
2565
2598
  }
2566
2599
  if (argc == 1) {
2567
- int _v;
2600
+ int _v = 0;
2568
2601
  void *vptr = 0;
2569
2602
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__Header, SWIG_POINTER_NO_NULL);
2570
2603
  _v = SWIG_CheckState(res);
2571
2604
  if (_v) {
2572
- return _wrap_new_Header__SWIG_3(nargs, args, self);
2573
- }
2574
- }
2575
- if (argc == 1) {
2576
- int _v;
2577
- int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
2578
- _v = SWIG_CheckState(res);
2579
- if (_v) {
2580
- return _wrap_new_Header__SWIG_0(nargs, args, self);
2605
+ return _wrap_new_Header__SWIG_2(nargs, args, self);
2581
2606
  }
2582
2607
  }
2583
2608
  if (argc == 2) {
2584
- int _v;
2609
+ int _v = 0;
2585
2610
  void *vptr = 0;
2586
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
2611
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__File, 0);
2587
2612
  _v = SWIG_CheckState(res);
2588
2613
  if (_v) {
2589
2614
  {
2590
- int res = SWIG_AsVal_long(argv[1], NULL);
2615
+ int res = SWIG_AsVal_long_SS_long(argv[1], NULL);
2591
2616
  _v = SWIG_CheckState(res);
2592
2617
  }
2593
2618
  if (_v) {
2594
- return _wrap_new_Header__SWIG_2(nargs, args, self);
2619
+ return _wrap_new_Header__SWIG_1(nargs, args, self);
2595
2620
  }
2596
2621
  }
2597
2622
  }
2598
2623
  if (argc == 3) {
2599
- int _v;
2624
+ int _v = 0;
2600
2625
  void *vptr = 0;
2601
- int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
2626
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__File, 0);
2602
2627
  _v = SWIG_CheckState(res);
2603
2628
  if (_v) {
2604
2629
  {
2605
- int res = SWIG_AsVal_long(argv[1], NULL);
2630
+ int res = SWIG_AsVal_long_SS_long(argv[1], NULL);
2606
2631
  _v = SWIG_CheckState(res);
2607
2632
  }
2608
2633
  if (_v) {
@@ -2611,7 +2636,7 @@ SWIGINTERN VALUE _wrap_new_Header(int nargs, VALUE *args, VALUE self) {
2611
2636
  _v = SWIG_CheckState(res);
2612
2637
  }
2613
2638
  if (_v) {
2614
- return _wrap_new_Header__SWIG_1(nargs, args, self);
2639
+ return _wrap_new_Header__SWIG_0(nargs, args, self);
2615
2640
  }
2616
2641
  }
2617
2642
  }
@@ -2619,9 +2644,8 @@ SWIGINTERN VALUE _wrap_new_Header(int nargs, VALUE *args, VALUE self) {
2619
2644
 
2620
2645
  fail:
2621
2646
  Ruby_Format_OverloadedError( argc, 3, "Header.new",
2622
- " Header.new(TagLib::ByteVector const &data)\n"
2623
- " Header.new(TagLib::MPEG::File *file, long offset, bool checkLength)\n"
2624
- " Header.new(TagLib::MPEG::File *file, long offset)\n"
2647
+ " Header.new(TagLib::File *file, TagLib::offset_t offset, bool checkLength)\n"
2648
+ " Header.new(TagLib::File *file, TagLib::offset_t offset)\n"
2625
2649
  " Header.new(TagLib::MPEG::Header const &h)\n");
2626
2650
 
2627
2651
  return Qnil;
@@ -2827,6 +2851,54 @@ fail:
2827
2851
  }
2828
2852
 
2829
2853
 
2854
+ SWIGINTERN VALUE
2855
+ _wrap_Header_channel_configuration(int argc, VALUE *argv, VALUE self) {
2856
+ TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ;
2857
+ void *argp1 = 0 ;
2858
+ int res1 = 0 ;
2859
+ TagLib::MPEG::Header::ChannelConfiguration result;
2860
+ VALUE vresult = Qnil;
2861
+
2862
+ if ((argc < 0) || (argc > 0)) {
2863
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2864
+ }
2865
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 );
2866
+ if (!SWIG_IsOK(res1)) {
2867
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","channelConfiguration", 1, self ));
2868
+ }
2869
+ arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1);
2870
+ result = (TagLib::MPEG::Header::ChannelConfiguration)((TagLib::MPEG::Header const *)arg1)->channelConfiguration();
2871
+ vresult = SWIG_From_int(static_cast< int >(result));
2872
+ return vresult;
2873
+ fail:
2874
+ return Qnil;
2875
+ }
2876
+
2877
+
2878
+ SWIGINTERN VALUE
2879
+ _wrap_Header_is_adts(int argc, VALUE *argv, VALUE self) {
2880
+ TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ;
2881
+ void *argp1 = 0 ;
2882
+ int res1 = 0 ;
2883
+ bool result;
2884
+ VALUE vresult = Qnil;
2885
+
2886
+ if ((argc < 0) || (argc > 0)) {
2887
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2888
+ }
2889
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Header, 0 | 0 );
2890
+ if (!SWIG_IsOK(res1)) {
2891
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Header const *","isADTS", 1, self ));
2892
+ }
2893
+ arg1 = reinterpret_cast< TagLib::MPEG::Header * >(argp1);
2894
+ result = (bool)((TagLib::MPEG::Header const *)arg1)->isADTS();
2895
+ vresult = SWIG_From_bool(static_cast< bool >(result));
2896
+ return vresult;
2897
+ fail:
2898
+ return Qnil;
2899
+ }
2900
+
2901
+
2830
2902
  SWIGINTERN VALUE
2831
2903
  _wrap_Header_copyrightedq___(int argc, VALUE *argv, VALUE self) {
2832
2904
  TagLib::MPEG::Header *arg1 = (TagLib::MPEG::Header *) 0 ;
@@ -3007,7 +3079,7 @@ SWIGINTERN VALUE _wrap_new_Properties(int nargs, VALUE *args, VALUE self) {
3007
3079
  argv[ii] = args[ii];
3008
3080
  }
3009
3081
  if (argc == 1) {
3010
- int _v;
3082
+ int _v = 0;
3011
3083
  void *vptr = 0;
3012
3084
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
3013
3085
  _v = SWIG_CheckState(res);
@@ -3016,7 +3088,7 @@ SWIGINTERN VALUE _wrap_new_Properties(int nargs, VALUE *args, VALUE self) {
3016
3088
  }
3017
3089
  }
3018
3090
  if (argc == 2) {
3019
- int _v;
3091
+ int _v = 0;
3020
3092
  void *vptr = 0;
3021
3093
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
3022
3094
  _v = SWIG_CheckState(res);
@@ -3047,30 +3119,6 @@ free_TagLib_MPEG_Properties(void *self) {
3047
3119
  delete arg1;
3048
3120
  }
3049
3121
 
3050
- SWIGINTERN VALUE
3051
- _wrap_Properties_length_in_seconds(int argc, VALUE *argv, VALUE self) {
3052
- TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
3053
- void *argp1 = 0 ;
3054
- int res1 = 0 ;
3055
- int result;
3056
- VALUE vresult = Qnil;
3057
-
3058
- if ((argc < 0) || (argc > 0)) {
3059
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3060
- }
3061
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 );
3062
- if (!SWIG_IsOK(res1)) {
3063
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","lengthInSeconds", 1, self ));
3064
- }
3065
- arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1);
3066
- result = (int)((TagLib::MPEG::Properties const *)arg1)->lengthInSeconds();
3067
- vresult = SWIG_From_int(static_cast< int >(result));
3068
- return vresult;
3069
- fail:
3070
- return Qnil;
3071
- }
3072
-
3073
-
3074
3122
  SWIGINTERN VALUE
3075
3123
  _wrap_Properties_length_in_milliseconds(int argc, VALUE *argv, VALUE self) {
3076
3124
  TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
@@ -3287,6 +3335,54 @@ fail:
3287
3335
  }
3288
3336
 
3289
3337
 
3338
+ SWIGINTERN VALUE
3339
+ _wrap_Properties_channel_configuration(int argc, VALUE *argv, VALUE self) {
3340
+ TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
3341
+ void *argp1 = 0 ;
3342
+ int res1 = 0 ;
3343
+ TagLib::MPEG::Header::ChannelConfiguration result;
3344
+ VALUE vresult = Qnil;
3345
+
3346
+ if ((argc < 0) || (argc > 0)) {
3347
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3348
+ }
3349
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 );
3350
+ if (!SWIG_IsOK(res1)) {
3351
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","channelConfiguration", 1, self ));
3352
+ }
3353
+ arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1);
3354
+ result = (TagLib::MPEG::Header::ChannelConfiguration)((TagLib::MPEG::Properties const *)arg1)->channelConfiguration();
3355
+ vresult = SWIG_From_int(static_cast< int >(result));
3356
+ return vresult;
3357
+ fail:
3358
+ return Qnil;
3359
+ }
3360
+
3361
+
3362
+ SWIGINTERN VALUE
3363
+ _wrap_Properties_is_adts(int argc, VALUE *argv, VALUE self) {
3364
+ TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
3365
+ void *argp1 = 0 ;
3366
+ int res1 = 0 ;
3367
+ bool result;
3368
+ VALUE vresult = Qnil;
3369
+
3370
+ if ((argc < 0) || (argc > 0)) {
3371
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3372
+ }
3373
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__Properties, 0 | 0 );
3374
+ if (!SWIG_IsOK(res1)) {
3375
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties const *","isADTS", 1, self ));
3376
+ }
3377
+ arg1 = reinterpret_cast< TagLib::MPEG::Properties * >(argp1);
3378
+ result = (bool)((TagLib::MPEG::Properties const *)arg1)->isADTS();
3379
+ vresult = SWIG_From_bool(static_cast< bool >(result));
3380
+ return vresult;
3381
+ fail:
3382
+ return Qnil;
3383
+ }
3384
+
3385
+
3290
3386
  SWIGINTERN VALUE
3291
3387
  _wrap_Properties_copyrightedq___(int argc, VALUE *argv, VALUE self) {
3292
3388
  TagLib::MPEG::Properties *arg1 = (TagLib::MPEG::Properties *) 0 ;
@@ -3339,6 +3435,53 @@ static swig_class SwigClassFile;
3339
3435
 
3340
3436
  SWIGINTERN VALUE
3341
3437
  _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) {
3438
+ TagLib::FileName arg1 ;
3439
+ bool arg2 ;
3440
+ TagLib::MPEG::Properties::ReadStyle arg3 ;
3441
+ TagLib::ID3v2::FrameFactory *arg4 = (TagLib::ID3v2::FrameFactory *) 0 ;
3442
+ bool val2 ;
3443
+ int ecode2 = 0 ;
3444
+ int val3 ;
3445
+ int ecode3 = 0 ;
3446
+ void *argp4 = 0 ;
3447
+ int res4 = 0 ;
3448
+ TagLib::MPEG::File *result = 0 ;
3449
+
3450
+ if ((argc < 4) || (argc > 4)) {
3451
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
3452
+ }
3453
+ {
3454
+ arg1 = ruby_string_to_taglib_filename(argv[0]);
3455
+ if ((const char *)(TagLib::FileName)(arg1) == NULL) {
3456
+ SWIG_exception_fail(SWIG_MemoryError, "Failed to allocate memory for file name.");
3457
+ }
3458
+ }
3459
+ ecode2 = SWIG_AsVal_bool(argv[1], &val2);
3460
+ if (!SWIG_IsOK(ecode2)) {
3461
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","File", 2, argv[1] ));
3462
+ }
3463
+ arg2 = static_cast< bool >(val2);
3464
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
3465
+ if (!SWIG_IsOK(ecode3)) {
3466
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::MPEG::Properties::ReadStyle","File", 3, argv[2] ));
3467
+ }
3468
+ arg3 = static_cast< TagLib::MPEG::Properties::ReadStyle >(val3);
3469
+ res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 );
3470
+ if (!SWIG_IsOK(res4)) {
3471
+ SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory *","File", 4, argv[3] ));
3472
+ }
3473
+ arg4 = reinterpret_cast< TagLib::ID3v2::FrameFactory * >(argp4);
3474
+ result = (TagLib::MPEG::File *)new TagLib::MPEG::File(arg1,arg2,arg3,arg4);
3475
+ DATA_PTR(self) = result;
3476
+ SWIG_RubyAddTracking(result, self);
3477
+ return self;
3478
+ fail:
3479
+ return Qnil;
3480
+ }
3481
+
3482
+
3483
+ SWIGINTERN VALUE
3484
+ _wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) {
3342
3485
  TagLib::FileName arg1 ;
3343
3486
  bool arg2 ;
3344
3487
  TagLib::MPEG::Properties::ReadStyle arg3 ;
@@ -3377,7 +3520,7 @@ fail:
3377
3520
 
3378
3521
 
3379
3522
  SWIGINTERN VALUE
3380
- _wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) {
3523
+ _wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) {
3381
3524
  TagLib::FileName arg1 ;
3382
3525
  bool arg2 ;
3383
3526
  bool val2 ;
@@ -3408,7 +3551,7 @@ fail:
3408
3551
 
3409
3552
 
3410
3553
  SWIGINTERN VALUE
3411
- _wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) {
3554
+ _wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) {
3412
3555
  TagLib::FileName arg1 ;
3413
3556
  TagLib::MPEG::File *result = 0 ;
3414
3557
 
@@ -3431,7 +3574,7 @@ fail:
3431
3574
 
3432
3575
 
3433
3576
  SWIGINTERN VALUE
3434
- _wrap_new_File__SWIG_3(int argc, VALUE *argv, VALUE self) {
3577
+ _wrap_new_File__SWIG_4(int argc, VALUE *argv, VALUE self) {
3435
3578
  TagLib::FileName arg1 ;
3436
3579
  TagLib::ID3v2::FrameFactory *arg2 = (TagLib::ID3v2::FrameFactory *) 0 ;
3437
3580
  bool arg3 ;
@@ -3478,7 +3621,7 @@ fail:
3478
3621
 
3479
3622
 
3480
3623
  SWIGINTERN VALUE
3481
- _wrap_new_File__SWIG_4(int argc, VALUE *argv, VALUE self) {
3624
+ _wrap_new_File__SWIG_5(int argc, VALUE *argv, VALUE self) {
3482
3625
  TagLib::FileName arg1 ;
3483
3626
  TagLib::ID3v2::FrameFactory *arg2 = (TagLib::ID3v2::FrameFactory *) 0 ;
3484
3627
  bool arg3 ;
@@ -3532,7 +3675,7 @@ _wrap_File_allocate(int argc, VALUE *argv, VALUE self)
3532
3675
 
3533
3676
 
3534
3677
  SWIGINTERN VALUE
3535
- _wrap_new_File__SWIG_5(int argc, VALUE *argv, VALUE self) {
3678
+ _wrap_new_File__SWIG_6(int argc, VALUE *argv, VALUE self) {
3536
3679
  TagLib::FileName arg1 ;
3537
3680
  TagLib::ID3v2::FrameFactory *arg2 = (TagLib::ID3v2::FrameFactory *) 0 ;
3538
3681
  void *argp2 = 0 ;
@@ -3573,15 +3716,15 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) {
3573
3716
  argv[ii] = args[ii];
3574
3717
  }
3575
3718
  if (argc == 1) {
3576
- int _v;
3719
+ int _v = 0;
3577
3720
  int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
3578
3721
  _v = SWIG_CheckState(res);
3579
3722
  if (_v) {
3580
- return _wrap_new_File__SWIG_2(nargs, args, self);
3723
+ return _wrap_new_File__SWIG_3(nargs, args, self);
3581
3724
  }
3582
3725
  }
3583
3726
  if (argc == 2) {
3584
- int _v;
3727
+ int _v = 0;
3585
3728
  int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
3586
3729
  _v = SWIG_CheckState(res);
3587
3730
  if (_v) {
@@ -3589,12 +3732,12 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) {
3589
3732
  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0);
3590
3733
  _v = SWIG_CheckState(res);
3591
3734
  if (_v) {
3592
- return _wrap_new_File__SWIG_5(nargs, args, self);
3735
+ return _wrap_new_File__SWIG_6(nargs, args, self);
3593
3736
  }
3594
3737
  }
3595
3738
  }
3596
3739
  if (argc == 2) {
3597
- int _v;
3740
+ int _v = 0;
3598
3741
  int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
3599
3742
  _v = SWIG_CheckState(res);
3600
3743
  if (_v) {
@@ -3603,12 +3746,12 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) {
3603
3746
  _v = SWIG_CheckState(res);
3604
3747
  }
3605
3748
  if (_v) {
3606
- return _wrap_new_File__SWIG_1(nargs, args, self);
3749
+ return _wrap_new_File__SWIG_2(nargs, args, self);
3607
3750
  }
3608
3751
  }
3609
3752
  }
3610
3753
  if (argc == 3) {
3611
- int _v;
3754
+ int _v = 0;
3612
3755
  int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
3613
3756
  _v = SWIG_CheckState(res);
3614
3757
  if (_v) {
@@ -3621,13 +3764,13 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) {
3621
3764
  _v = SWIG_CheckState(res);
3622
3765
  }
3623
3766
  if (_v) {
3624
- return _wrap_new_File__SWIG_4(nargs, args, self);
3767
+ return _wrap_new_File__SWIG_5(nargs, args, self);
3625
3768
  }
3626
3769
  }
3627
3770
  }
3628
3771
  }
3629
3772
  if (argc == 3) {
3630
- int _v;
3773
+ int _v = 0;
3631
3774
  int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
3632
3775
  _v = SWIG_CheckState(res);
3633
3776
  if (_v) {
@@ -3641,13 +3784,13 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) {
3641
3784
  _v = SWIG_CheckState(res);
3642
3785
  }
3643
3786
  if (_v) {
3644
- return _wrap_new_File__SWIG_0(nargs, args, self);
3787
+ return _wrap_new_File__SWIG_1(nargs, args, self);
3645
3788
  }
3646
3789
  }
3647
3790
  }
3648
3791
  }
3649
3792
  if (argc == 4) {
3650
- int _v;
3793
+ int _v = 0;
3651
3794
  int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
3652
3795
  _v = SWIG_CheckState(res);
3653
3796
  if (_v) {
@@ -3665,7 +3808,32 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) {
3665
3808
  _v = SWIG_CheckState(res);
3666
3809
  }
3667
3810
  if (_v) {
3668
- return _wrap_new_File__SWIG_3(nargs, args, self);
3811
+ return _wrap_new_File__SWIG_4(nargs, args, self);
3812
+ }
3813
+ }
3814
+ }
3815
+ }
3816
+ }
3817
+ if (argc == 4) {
3818
+ int _v = 0;
3819
+ int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
3820
+ _v = SWIG_CheckState(res);
3821
+ if (_v) {
3822
+ {
3823
+ int res = SWIG_AsVal_bool(argv[1], NULL);
3824
+ _v = SWIG_CheckState(res);
3825
+ }
3826
+ if (_v) {
3827
+ {
3828
+ int res = SWIG_AsVal_int(argv[2], NULL);
3829
+ _v = SWIG_CheckState(res);
3830
+ }
3831
+ if (_v) {
3832
+ void *vptr = 0;
3833
+ int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0);
3834
+ _v = SWIG_CheckState(res);
3835
+ if (_v) {
3836
+ return _wrap_new_File__SWIG_0(nargs, args, self);
3669
3837
  }
3670
3838
  }
3671
3839
  }
@@ -3674,10 +3842,11 @@ SWIGINTERN VALUE _wrap_new_File(int nargs, VALUE *args, VALUE self) {
3674
3842
 
3675
3843
  fail:
3676
3844
  Ruby_Format_OverloadedError( argc, 4, "File.new",
3677
- " File.new(TagLib::FileName file, bool readProperties, TagLib::MPEG::Properties::ReadStyle propertiesStyle)\n"
3845
+ " File.new(TagLib::FileName file, bool readProperties, TagLib::MPEG::Properties::ReadStyle readStyle, TagLib::ID3v2::FrameFactory *frameFactory)\n"
3846
+ " File.new(TagLib::FileName file, bool readProperties, TagLib::MPEG::Properties::ReadStyle readStyle)\n"
3678
3847
  " File.new(TagLib::FileName file, bool readProperties)\n"
3679
3848
  " File.new(TagLib::FileName file)\n"
3680
- " File.new(TagLib::FileName file, TagLib::ID3v2::FrameFactory *frameFactory, bool readProperties, TagLib::MPEG::Properties::ReadStyle propertiesStyle)\n"
3849
+ " File.new(TagLib::FileName file, TagLib::ID3v2::FrameFactory *frameFactory, bool readProperties, TagLib::MPEG::Properties::ReadStyle readStyle)\n"
3681
3850
  " File.new(TagLib::FileName file, TagLib::ID3v2::FrameFactory *frameFactory, bool readProperties)\n"
3682
3851
  " File.new(TagLib::FileName file, TagLib::ID3v2::FrameFactory *frameFactory)\n");
3683
3852
 
@@ -3761,15 +3930,24 @@ SWIGINTERN VALUE
3761
3930
  _wrap_File_save__SWIG_1(int argc, VALUE *argv, VALUE self) {
3762
3931
  TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
3763
3932
  int arg2 ;
3933
+ TagLib::File::StripTags arg3 ;
3934
+ TagLib::ID3v2::Version arg4 ;
3935
+ TagLib::File::DuplicateTags arg5 ;
3764
3936
  void *argp1 = 0 ;
3765
3937
  int res1 = 0 ;
3766
3938
  int val2 ;
3767
3939
  int ecode2 = 0 ;
3940
+ int val3 ;
3941
+ int ecode3 = 0 ;
3942
+ int val4 ;
3943
+ int ecode4 = 0 ;
3944
+ int val5 ;
3945
+ int ecode5 = 0 ;
3768
3946
  bool result;
3769
3947
  VALUE vresult = Qnil;
3770
3948
 
3771
- if ((argc < 1) || (argc > 1)) {
3772
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3949
+ if ((argc < 4) || (argc > 4)) {
3950
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
3773
3951
  }
3774
3952
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 );
3775
3953
  if (!SWIG_IsOK(res1)) {
@@ -3781,7 +3959,22 @@ _wrap_File_save__SWIG_1(int argc, VALUE *argv, VALUE self) {
3781
3959
  SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","save", 2, argv[0] ));
3782
3960
  }
3783
3961
  arg2 = static_cast< int >(val2);
3784
- result = (bool)(arg1)->save(arg2);
3962
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
3963
+ if (!SWIG_IsOK(ecode3)) {
3964
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::File::StripTags","save", 3, argv[1] ));
3965
+ }
3966
+ arg3 = static_cast< TagLib::File::StripTags >(val3);
3967
+ ecode4 = SWIG_AsVal_int(argv[2], &val4);
3968
+ if (!SWIG_IsOK(ecode4)) {
3969
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "TagLib::ID3v2::Version","save", 4, argv[2] ));
3970
+ }
3971
+ arg4 = static_cast< TagLib::ID3v2::Version >(val4);
3972
+ ecode5 = SWIG_AsVal_int(argv[3], &val5);
3973
+ if (!SWIG_IsOK(ecode5)) {
3974
+ SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "TagLib::File::DuplicateTags","save", 5, argv[3] ));
3975
+ }
3976
+ arg5 = static_cast< TagLib::File::DuplicateTags >(val5);
3977
+ result = (bool)(arg1)->save(arg2,arg3,arg4,arg5);
3785
3978
  vresult = SWIG_From_bool(static_cast< bool >(result));
3786
3979
  return vresult;
3787
3980
  fail:
@@ -3793,18 +3986,21 @@ SWIGINTERN VALUE
3793
3986
  _wrap_File_save__SWIG_2(int argc, VALUE *argv, VALUE self) {
3794
3987
  TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
3795
3988
  int arg2 ;
3796
- bool arg3 ;
3989
+ TagLib::File::StripTags arg3 ;
3990
+ TagLib::ID3v2::Version arg4 ;
3797
3991
  void *argp1 = 0 ;
3798
3992
  int res1 = 0 ;
3799
3993
  int val2 ;
3800
3994
  int ecode2 = 0 ;
3801
- bool val3 ;
3995
+ int val3 ;
3802
3996
  int ecode3 = 0 ;
3997
+ int val4 ;
3998
+ int ecode4 = 0 ;
3803
3999
  bool result;
3804
4000
  VALUE vresult = Qnil;
3805
4001
 
3806
- if ((argc < 2) || (argc > 2)) {
3807
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4002
+ if ((argc < 3) || (argc > 3)) {
4003
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3808
4004
  }
3809
4005
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 );
3810
4006
  if (!SWIG_IsOK(res1)) {
@@ -3816,12 +4012,17 @@ _wrap_File_save__SWIG_2(int argc, VALUE *argv, VALUE self) {
3816
4012
  SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","save", 2, argv[0] ));
3817
4013
  }
3818
4014
  arg2 = static_cast< int >(val2);
3819
- ecode3 = SWIG_AsVal_bool(argv[1], &val3);
4015
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
3820
4016
  if (!SWIG_IsOK(ecode3)) {
3821
- SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","save", 3, argv[1] ));
4017
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::File::StripTags","save", 3, argv[1] ));
3822
4018
  }
3823
- arg3 = static_cast< bool >(val3);
3824
- result = (bool)(arg1)->save(arg2,arg3);
4019
+ arg3 = static_cast< TagLib::File::StripTags >(val3);
4020
+ ecode4 = SWIG_AsVal_int(argv[2], &val4);
4021
+ if (!SWIG_IsOK(ecode4)) {
4022
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "TagLib::ID3v2::Version","save", 4, argv[2] ));
4023
+ }
4024
+ arg4 = static_cast< TagLib::ID3v2::Version >(val4);
4025
+ result = (bool)(arg1)->save(arg2,arg3,arg4);
3825
4026
  vresult = SWIG_From_bool(static_cast< bool >(result));
3826
4027
  return vresult;
3827
4028
  fail:
@@ -3833,21 +4034,18 @@ SWIGINTERN VALUE
3833
4034
  _wrap_File_save__SWIG_3(int argc, VALUE *argv, VALUE self) {
3834
4035
  TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
3835
4036
  int arg2 ;
3836
- bool arg3 ;
3837
- int arg4 ;
4037
+ TagLib::File::StripTags arg3 ;
3838
4038
  void *argp1 = 0 ;
3839
4039
  int res1 = 0 ;
3840
4040
  int val2 ;
3841
4041
  int ecode2 = 0 ;
3842
- bool val3 ;
4042
+ int val3 ;
3843
4043
  int ecode3 = 0 ;
3844
- int val4 ;
3845
- int ecode4 = 0 ;
3846
4044
  bool result;
3847
4045
  VALUE vresult = Qnil;
3848
4046
 
3849
- if ((argc < 3) || (argc > 3)) {
3850
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
4047
+ if ((argc < 2) || (argc > 2)) {
4048
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3851
4049
  }
3852
4050
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 );
3853
4051
  if (!SWIG_IsOK(res1)) {
@@ -3859,17 +4057,12 @@ _wrap_File_save__SWIG_3(int argc, VALUE *argv, VALUE self) {
3859
4057
  SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","save", 2, argv[0] ));
3860
4058
  }
3861
4059
  arg2 = static_cast< int >(val2);
3862
- ecode3 = SWIG_AsVal_bool(argv[1], &val3);
4060
+ ecode3 = SWIG_AsVal_int(argv[1], &val3);
3863
4061
  if (!SWIG_IsOK(ecode3)) {
3864
- SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","save", 3, argv[1] ));
3865
- }
3866
- arg3 = static_cast< bool >(val3);
3867
- ecode4 = SWIG_AsVal_int(argv[2], &val4);
3868
- if (!SWIG_IsOK(ecode4)) {
3869
- SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","save", 4, argv[2] ));
4062
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::File::StripTags","save", 3, argv[1] ));
3870
4063
  }
3871
- arg4 = static_cast< int >(val4);
3872
- result = (bool)(arg1)->save(arg2,arg3,arg4);
4064
+ arg3 = static_cast< TagLib::File::StripTags >(val3);
4065
+ result = (bool)(arg1)->save(arg2,arg3);
3873
4066
  vresult = SWIG_From_bool(static_cast< bool >(result));
3874
4067
  return vresult;
3875
4068
  fail:
@@ -3881,24 +4074,15 @@ SWIGINTERN VALUE
3881
4074
  _wrap_File_save__SWIG_4(int argc, VALUE *argv, VALUE self) {
3882
4075
  TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
3883
4076
  int arg2 ;
3884
- bool arg3 ;
3885
- int arg4 ;
3886
- bool arg5 ;
3887
4077
  void *argp1 = 0 ;
3888
4078
  int res1 = 0 ;
3889
4079
  int val2 ;
3890
4080
  int ecode2 = 0 ;
3891
- bool val3 ;
3892
- int ecode3 = 0 ;
3893
- int val4 ;
3894
- int ecode4 = 0 ;
3895
- bool val5 ;
3896
- int ecode5 = 0 ;
3897
4081
  bool result;
3898
4082
  VALUE vresult = Qnil;
3899
4083
 
3900
- if ((argc < 4) || (argc > 4)) {
3901
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
4084
+ if ((argc < 1) || (argc > 1)) {
4085
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3902
4086
  }
3903
4087
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 );
3904
4088
  if (!SWIG_IsOK(res1)) {
@@ -3910,22 +4094,7 @@ _wrap_File_save__SWIG_4(int argc, VALUE *argv, VALUE self) {
3910
4094
  SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","save", 2, argv[0] ));
3911
4095
  }
3912
4096
  arg2 = static_cast< int >(val2);
3913
- ecode3 = SWIG_AsVal_bool(argv[1], &val3);
3914
- if (!SWIG_IsOK(ecode3)) {
3915
- SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","save", 3, argv[1] ));
3916
- }
3917
- arg3 = static_cast< bool >(val3);
3918
- ecode4 = SWIG_AsVal_int(argv[2], &val4);
3919
- if (!SWIG_IsOK(ecode4)) {
3920
- SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","save", 4, argv[2] ));
3921
- }
3922
- arg4 = static_cast< int >(val4);
3923
- ecode5 = SWIG_AsVal_bool(argv[3], &val5);
3924
- if (!SWIG_IsOK(ecode5)) {
3925
- SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "bool","save", 5, argv[3] ));
3926
- }
3927
- arg5 = static_cast< bool >(val5);
3928
- result = (bool)(arg1)->save(arg2,arg3,arg4,arg5);
4097
+ result = (bool)(arg1)->save(arg2);
3929
4098
  vresult = SWIG_From_bool(static_cast< bool >(result));
3930
4099
  return vresult;
3931
4100
  fail:
@@ -3945,7 +4114,7 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) {
3945
4114
  argv[ii] = args[ii-1];
3946
4115
  }
3947
4116
  if (argc == 1) {
3948
- int _v;
4117
+ int _v = 0;
3949
4118
  void *vptr = 0;
3950
4119
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
3951
4120
  _v = SWIG_CheckState(res);
@@ -3954,7 +4123,7 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) {
3954
4123
  }
3955
4124
  }
3956
4125
  if (argc == 2) {
3957
- int _v;
4126
+ int _v = 0;
3958
4127
  void *vptr = 0;
3959
4128
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
3960
4129
  _v = SWIG_CheckState(res);
@@ -3964,12 +4133,12 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) {
3964
4133
  _v = SWIG_CheckState(res);
3965
4134
  }
3966
4135
  if (_v) {
3967
- return _wrap_File_save__SWIG_1(nargs, args, self);
4136
+ return _wrap_File_save__SWIG_4(nargs, args, self);
3968
4137
  }
3969
4138
  }
3970
4139
  }
3971
4140
  if (argc == 3) {
3972
- int _v;
4141
+ int _v = 0;
3973
4142
  void *vptr = 0;
3974
4143
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
3975
4144
  _v = SWIG_CheckState(res);
@@ -3980,17 +4149,17 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) {
3980
4149
  }
3981
4150
  if (_v) {
3982
4151
  {
3983
- int res = SWIG_AsVal_bool(argv[2], NULL);
4152
+ int res = SWIG_AsVal_int(argv[2], NULL);
3984
4153
  _v = SWIG_CheckState(res);
3985
4154
  }
3986
4155
  if (_v) {
3987
- return _wrap_File_save__SWIG_2(nargs, args, self);
4156
+ return _wrap_File_save__SWIG_3(nargs, args, self);
3988
4157
  }
3989
4158
  }
3990
4159
  }
3991
4160
  }
3992
4161
  if (argc == 4) {
3993
- int _v;
4162
+ int _v = 0;
3994
4163
  void *vptr = 0;
3995
4164
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
3996
4165
  _v = SWIG_CheckState(res);
@@ -4001,7 +4170,7 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) {
4001
4170
  }
4002
4171
  if (_v) {
4003
4172
  {
4004
- int res = SWIG_AsVal_bool(argv[2], NULL);
4173
+ int res = SWIG_AsVal_int(argv[2], NULL);
4005
4174
  _v = SWIG_CheckState(res);
4006
4175
  }
4007
4176
  if (_v) {
@@ -4010,14 +4179,14 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) {
4010
4179
  _v = SWIG_CheckState(res);
4011
4180
  }
4012
4181
  if (_v) {
4013
- return _wrap_File_save__SWIG_3(nargs, args, self);
4182
+ return _wrap_File_save__SWIG_2(nargs, args, self);
4014
4183
  }
4015
4184
  }
4016
4185
  }
4017
4186
  }
4018
4187
  }
4019
4188
  if (argc == 5) {
4020
- int _v;
4189
+ int _v = 0;
4021
4190
  void *vptr = 0;
4022
4191
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
4023
4192
  _v = SWIG_CheckState(res);
@@ -4028,7 +4197,7 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) {
4028
4197
  }
4029
4198
  if (_v) {
4030
4199
  {
4031
- int res = SWIG_AsVal_bool(argv[2], NULL);
4200
+ int res = SWIG_AsVal_int(argv[2], NULL);
4032
4201
  _v = SWIG_CheckState(res);
4033
4202
  }
4034
4203
  if (_v) {
@@ -4038,11 +4207,11 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) {
4038
4207
  }
4039
4208
  if (_v) {
4040
4209
  {
4041
- int res = SWIG_AsVal_bool(argv[4], NULL);
4210
+ int res = SWIG_AsVal_int(argv[4], NULL);
4042
4211
  _v = SWIG_CheckState(res);
4043
4212
  }
4044
4213
  if (_v) {
4045
- return _wrap_File_save__SWIG_4(nargs, args, self);
4214
+ return _wrap_File_save__SWIG_1(nargs, args, self);
4046
4215
  }
4047
4216
  }
4048
4217
  }
@@ -4053,10 +4222,10 @@ SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) {
4053
4222
  fail:
4054
4223
  Ruby_Format_OverloadedError( argc, 6, "File.save",
4055
4224
  " bool File.save()\n"
4056
- " bool File.save(int tags)\n"
4057
- " bool File.save(int tags, bool stripOthers)\n"
4058
- " bool File.save(int tags, bool stripOthers, int id3v2Version)\n"
4059
- " bool File.save(int tags, bool stripOthers, int id3v2Version, bool duplicateTags)\n");
4225
+ " bool File.save(int tags, TagLib::File::StripTags strip, TagLib::ID3v2::Version version, TagLib::File::DuplicateTags duplicate)\n"
4226
+ " bool File.save(int tags, TagLib::File::StripTags strip, TagLib::ID3v2::Version version)\n"
4227
+ " bool File.save(int tags, TagLib::File::StripTags strip)\n"
4228
+ " bool File.save(int tags)\n");
4060
4229
 
4061
4230
  return Qnil;
4062
4231
  }
@@ -4130,7 +4299,7 @@ SWIGINTERN VALUE _wrap_File_id3v2_tag(int nargs, VALUE *args, VALUE self) {
4130
4299
  argv[ii] = args[ii-1];
4131
4300
  }
4132
4301
  if (argc == 1) {
4133
- int _v;
4302
+ int _v = 0;
4134
4303
  void *vptr = 0;
4135
4304
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
4136
4305
  _v = SWIG_CheckState(res);
@@ -4139,7 +4308,7 @@ SWIGINTERN VALUE _wrap_File_id3v2_tag(int nargs, VALUE *args, VALUE self) {
4139
4308
  }
4140
4309
  }
4141
4310
  if (argc == 2) {
4142
- int _v;
4311
+ int _v = 0;
4143
4312
  void *vptr = 0;
4144
4313
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
4145
4314
  _v = SWIG_CheckState(res);
@@ -4231,7 +4400,7 @@ SWIGINTERN VALUE _wrap_File_id3v1_tag(int nargs, VALUE *args, VALUE self) {
4231
4400
  argv[ii] = args[ii-1];
4232
4401
  }
4233
4402
  if (argc == 1) {
4234
- int _v;
4403
+ int _v = 0;
4235
4404
  void *vptr = 0;
4236
4405
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
4237
4406
  _v = SWIG_CheckState(res);
@@ -4240,7 +4409,7 @@ SWIGINTERN VALUE _wrap_File_id3v1_tag(int nargs, VALUE *args, VALUE self) {
4240
4409
  }
4241
4410
  }
4242
4411
  if (argc == 2) {
4243
- int _v;
4412
+ int _v = 0;
4244
4413
  void *vptr = 0;
4245
4414
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
4246
4415
  _v = SWIG_CheckState(res);
@@ -4332,7 +4501,7 @@ SWIGINTERN VALUE _wrap_File_apetag(int nargs, VALUE *args, VALUE self) {
4332
4501
  argv[ii] = args[ii-1];
4333
4502
  }
4334
4503
  if (argc == 1) {
4335
- int _v;
4504
+ int _v = 0;
4336
4505
  void *vptr = 0;
4337
4506
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
4338
4507
  _v = SWIG_CheckState(res);
@@ -4341,7 +4510,7 @@ SWIGINTERN VALUE _wrap_File_apetag(int nargs, VALUE *args, VALUE self) {
4341
4510
  }
4342
4511
  }
4343
4512
  if (argc == 2) {
4344
- int _v;
4513
+ int _v = 0;
4345
4514
  void *vptr = 0;
4346
4515
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
4347
4516
  _v = SWIG_CheckState(res);
@@ -4369,15 +4538,18 @@ SWIGINTERN VALUE
4369
4538
  _wrap_File_strip__SWIG_0(int argc, VALUE *argv, VALUE self) {
4370
4539
  TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
4371
4540
  int arg2 ;
4541
+ bool arg3 ;
4372
4542
  void *argp1 = 0 ;
4373
4543
  int res1 = 0 ;
4374
4544
  int val2 ;
4375
4545
  int ecode2 = 0 ;
4546
+ bool val3 ;
4547
+ int ecode3 = 0 ;
4376
4548
  bool result;
4377
4549
  VALUE vresult = Qnil;
4378
4550
 
4379
- if ((argc < 1) || (argc > 1)) {
4380
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4551
+ if ((argc < 2) || (argc > 2)) {
4552
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4381
4553
  }
4382
4554
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 );
4383
4555
  if (!SWIG_IsOK(res1)) {
@@ -4389,7 +4561,12 @@ _wrap_File_strip__SWIG_0(int argc, VALUE *argv, VALUE self) {
4389
4561
  SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","strip", 2, argv[0] ));
4390
4562
  }
4391
4563
  arg2 = static_cast< int >(val2);
4392
- result = (bool)(arg1)->strip(arg2);
4564
+ ecode3 = SWIG_AsVal_bool(argv[1], &val3);
4565
+ if (!SWIG_IsOK(ecode3)) {
4566
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","strip", 3, argv[1] ));
4567
+ }
4568
+ arg3 = static_cast< bool >(val3);
4569
+ result = (bool)(arg1)->strip(arg2,arg3);
4393
4570
  vresult = SWIG_From_bool(static_cast< bool >(result));
4394
4571
  return vresult;
4395
4572
  fail:
@@ -4400,20 +4577,28 @@ fail:
4400
4577
  SWIGINTERN VALUE
4401
4578
  _wrap_File_strip__SWIG_1(int argc, VALUE *argv, VALUE self) {
4402
4579
  TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
4580
+ int arg2 ;
4403
4581
  void *argp1 = 0 ;
4404
4582
  int res1 = 0 ;
4583
+ int val2 ;
4584
+ int ecode2 = 0 ;
4405
4585
  bool result;
4406
4586
  VALUE vresult = Qnil;
4407
4587
 
4408
- if ((argc < 0) || (argc > 0)) {
4409
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4588
+ if ((argc < 1) || (argc > 1)) {
4589
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4410
4590
  }
4411
4591
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 );
4412
4592
  if (!SWIG_IsOK(res1)) {
4413
4593
  SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","strip", 1, self ));
4414
4594
  }
4415
4595
  arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1);
4416
- result = (bool)(arg1)->strip();
4596
+ ecode2 = SWIG_AsVal_int(argv[0], &val2);
4597
+ if (!SWIG_IsOK(ecode2)) {
4598
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","strip", 2, argv[0] ));
4599
+ }
4600
+ arg2 = static_cast< int >(val2);
4601
+ result = (bool)(arg1)->strip(arg2);
4417
4602
  vresult = SWIG_From_bool(static_cast< bool >(result));
4418
4603
  return vresult;
4419
4604
  fail:
@@ -4424,36 +4609,20 @@ fail:
4424
4609
  SWIGINTERN VALUE
4425
4610
  _wrap_File_strip__SWIG_2(int argc, VALUE *argv, VALUE self) {
4426
4611
  TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
4427
- int arg2 ;
4428
- bool arg3 ;
4429
4612
  void *argp1 = 0 ;
4430
4613
  int res1 = 0 ;
4431
- int val2 ;
4432
- int ecode2 = 0 ;
4433
- bool val3 ;
4434
- int ecode3 = 0 ;
4435
4614
  bool result;
4436
4615
  VALUE vresult = Qnil;
4437
4616
 
4438
- if ((argc < 2) || (argc > 2)) {
4439
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4617
+ if ((argc < 0) || (argc > 0)) {
4618
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4440
4619
  }
4441
4620
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 );
4442
4621
  if (!SWIG_IsOK(res1)) {
4443
4622
  SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","strip", 1, self ));
4444
4623
  }
4445
4624
  arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1);
4446
- ecode2 = SWIG_AsVal_int(argv[0], &val2);
4447
- if (!SWIG_IsOK(ecode2)) {
4448
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","strip", 2, argv[0] ));
4449
- }
4450
- arg2 = static_cast< int >(val2);
4451
- ecode3 = SWIG_AsVal_bool(argv[1], &val3);
4452
- if (!SWIG_IsOK(ecode3)) {
4453
- SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","strip", 3, argv[1] ));
4454
- }
4455
- arg3 = static_cast< bool >(val3);
4456
- result = (bool)(arg1)->strip(arg2,arg3);
4625
+ result = (bool)(arg1)->strip();
4457
4626
  vresult = SWIG_From_bool(static_cast< bool >(result));
4458
4627
  return vresult;
4459
4628
  fail:
@@ -4473,16 +4642,16 @@ SWIGINTERN VALUE _wrap_File_strip(int nargs, VALUE *args, VALUE self) {
4473
4642
  argv[ii] = args[ii-1];
4474
4643
  }
4475
4644
  if (argc == 1) {
4476
- int _v;
4645
+ int _v = 0;
4477
4646
  void *vptr = 0;
4478
4647
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
4479
4648
  _v = SWIG_CheckState(res);
4480
4649
  if (_v) {
4481
- return _wrap_File_strip__SWIG_1(nargs, args, self);
4650
+ return _wrap_File_strip__SWIG_2(nargs, args, self);
4482
4651
  }
4483
4652
  }
4484
4653
  if (argc == 2) {
4485
- int _v;
4654
+ int _v = 0;
4486
4655
  void *vptr = 0;
4487
4656
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
4488
4657
  _v = SWIG_CheckState(res);
@@ -4492,12 +4661,12 @@ SWIGINTERN VALUE _wrap_File_strip(int nargs, VALUE *args, VALUE self) {
4492
4661
  _v = SWIG_CheckState(res);
4493
4662
  }
4494
4663
  if (_v) {
4495
- return _wrap_File_strip__SWIG_0(nargs, args, self);
4664
+ return _wrap_File_strip__SWIG_1(nargs, args, self);
4496
4665
  }
4497
4666
  }
4498
4667
  }
4499
4668
  if (argc == 3) {
4500
- int _v;
4669
+ int _v = 0;
4501
4670
  void *vptr = 0;
4502
4671
  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__MPEG__File, 0);
4503
4672
  _v = SWIG_CheckState(res);
@@ -4512,7 +4681,7 @@ SWIGINTERN VALUE _wrap_File_strip(int nargs, VALUE *args, VALUE self) {
4512
4681
  _v = SWIG_CheckState(res);
4513
4682
  }
4514
4683
  if (_v) {
4515
- return _wrap_File_strip__SWIG_2(nargs, args, self);
4684
+ return _wrap_File_strip__SWIG_0(nargs, args, self);
4516
4685
  }
4517
4686
  }
4518
4687
  }
@@ -4520,39 +4689,10 @@ SWIGINTERN VALUE _wrap_File_strip(int nargs, VALUE *args, VALUE self) {
4520
4689
 
4521
4690
  fail:
4522
4691
  Ruby_Format_OverloadedError( argc, 4, "File.strip",
4692
+ " bool File.strip(int tags, bool freeMemory)\n"
4523
4693
  " bool File.strip(int tags)\n"
4524
- " bool File.strip()\n"
4525
- " bool File.strip(int tags, bool freeMemory)\n");
4526
-
4527
- return Qnil;
4528
- }
4529
-
4530
-
4531
- SWIGINTERN VALUE
4532
- _wrap_File_set_id3v2_frame_factory(int argc, VALUE *argv, VALUE self) {
4533
- TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
4534
- TagLib::ID3v2::FrameFactory *arg2 = (TagLib::ID3v2::FrameFactory *) 0 ;
4535
- void *argp1 = 0 ;
4536
- int res1 = 0 ;
4537
- void *argp2 = 0 ;
4538
- int res2 = 0 ;
4694
+ " bool File.strip()\n");
4539
4695
 
4540
- if ((argc < 1) || (argc > 1)) {
4541
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4542
- }
4543
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__MPEG__File, 0 | 0 );
4544
- if (!SWIG_IsOK(res1)) {
4545
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","setID3v2FrameFactory", 1, self ));
4546
- }
4547
- arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1);
4548
- res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_TagLib__ID3v2__FrameFactory, 0 | 0 );
4549
- if (!SWIG_IsOK(res2)) {
4550
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "TagLib::ID3v2::FrameFactory const *","setID3v2FrameFactory", 2, argv[0] ));
4551
- }
4552
- arg2 = reinterpret_cast< TagLib::ID3v2::FrameFactory * >(argp2);
4553
- (arg1)->setID3v2FrameFactory((TagLib::ID3v2::FrameFactory const *)arg2);
4554
- return Qnil;
4555
- fail:
4556
4696
  return Qnil;
4557
4697
  }
4558
4698
 
@@ -4562,7 +4702,7 @@ _wrap_File_first_frame_offset(int argc, VALUE *argv, VALUE self) {
4562
4702
  TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
4563
4703
  void *argp1 = 0 ;
4564
4704
  int res1 = 0 ;
4565
- long result;
4705
+ TagLib::offset_t result;
4566
4706
  VALUE vresult = Qnil;
4567
4707
 
4568
4708
  if ((argc < 0) || (argc > 0)) {
@@ -4573,8 +4713,10 @@ _wrap_File_first_frame_offset(int argc, VALUE *argv, VALUE self) {
4573
4713
  SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","firstFrameOffset", 1, self ));
4574
4714
  }
4575
4715
  arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1);
4576
- result = (long)(arg1)->firstFrameOffset();
4577
- vresult = SWIG_From_long(static_cast< long >(result));
4716
+ result = (TagLib::offset_t)(arg1)->firstFrameOffset();
4717
+ {
4718
+ vresult = taglib_offset_t_to_ruby_int(result);
4719
+ }
4578
4720
  return vresult;
4579
4721
  fail:
4580
4722
  return Qnil;
@@ -4584,12 +4726,12 @@ fail:
4584
4726
  SWIGINTERN VALUE
4585
4727
  _wrap_File_next_frame_offset(int argc, VALUE *argv, VALUE self) {
4586
4728
  TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
4587
- long arg2 ;
4729
+ TagLib::offset_t arg2 ;
4588
4730
  void *argp1 = 0 ;
4589
4731
  int res1 = 0 ;
4590
- long val2 ;
4732
+ long long val2 ;
4591
4733
  int ecode2 = 0 ;
4592
- long result;
4734
+ TagLib::offset_t result;
4593
4735
  VALUE vresult = Qnil;
4594
4736
 
4595
4737
  if ((argc < 1) || (argc > 1)) {
@@ -4600,13 +4742,15 @@ _wrap_File_next_frame_offset(int argc, VALUE *argv, VALUE self) {
4600
4742
  SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","nextFrameOffset", 1, self ));
4601
4743
  }
4602
4744
  arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1);
4603
- ecode2 = SWIG_AsVal_long(argv[0], &val2);
4745
+ ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2);
4604
4746
  if (!SWIG_IsOK(ecode2)) {
4605
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","nextFrameOffset", 2, argv[0] ));
4747
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","nextFrameOffset", 2, argv[0] ));
4606
4748
  }
4607
- arg2 = static_cast< long >(val2);
4608
- result = (long)(arg1)->nextFrameOffset(arg2);
4609
- vresult = SWIG_From_long(static_cast< long >(result));
4749
+ arg2 = static_cast< TagLib::offset_t >(val2);
4750
+ result = (TagLib::offset_t)(arg1)->nextFrameOffset(arg2);
4751
+ {
4752
+ vresult = taglib_offset_t_to_ruby_int(result);
4753
+ }
4610
4754
  return vresult;
4611
4755
  fail:
4612
4756
  return Qnil;
@@ -4616,12 +4760,12 @@ fail:
4616
4760
  SWIGINTERN VALUE
4617
4761
  _wrap_File_previous_frame_offset(int argc, VALUE *argv, VALUE self) {
4618
4762
  TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
4619
- long arg2 ;
4763
+ TagLib::offset_t arg2 ;
4620
4764
  void *argp1 = 0 ;
4621
4765
  int res1 = 0 ;
4622
- long val2 ;
4766
+ long long val2 ;
4623
4767
  int ecode2 = 0 ;
4624
- long result;
4768
+ TagLib::offset_t result;
4625
4769
  VALUE vresult = Qnil;
4626
4770
 
4627
4771
  if ((argc < 1) || (argc > 1)) {
@@ -4632,13 +4776,15 @@ _wrap_File_previous_frame_offset(int argc, VALUE *argv, VALUE self) {
4632
4776
  SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","previousFrameOffset", 1, self ));
4633
4777
  }
4634
4778
  arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1);
4635
- ecode2 = SWIG_AsVal_long(argv[0], &val2);
4779
+ ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2);
4636
4780
  if (!SWIG_IsOK(ecode2)) {
4637
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","previousFrameOffset", 2, argv[0] ));
4781
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::offset_t","previousFrameOffset", 2, argv[0] ));
4638
4782
  }
4639
- arg2 = static_cast< long >(val2);
4640
- result = (long)(arg1)->previousFrameOffset(arg2);
4641
- vresult = SWIG_From_long(static_cast< long >(result));
4783
+ arg2 = static_cast< TagLib::offset_t >(val2);
4784
+ result = (TagLib::offset_t)(arg1)->previousFrameOffset(arg2);
4785
+ {
4786
+ vresult = taglib_offset_t_to_ruby_int(result);
4787
+ }
4642
4788
  return vresult;
4643
4789
  fail:
4644
4790
  return Qnil;
@@ -4650,7 +4796,7 @@ _wrap_File_last_frame_offset(int argc, VALUE *argv, VALUE self) {
4650
4796
  TagLib::MPEG::File *arg1 = (TagLib::MPEG::File *) 0 ;
4651
4797
  void *argp1 = 0 ;
4652
4798
  int res1 = 0 ;
4653
- long result;
4799
+ TagLib::offset_t result;
4654
4800
  VALUE vresult = Qnil;
4655
4801
 
4656
4802
  if ((argc < 0) || (argc > 0)) {
@@ -4661,8 +4807,10 @@ _wrap_File_last_frame_offset(int argc, VALUE *argv, VALUE self) {
4661
4807
  SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::MPEG::File *","lastFrameOffset", 1, self ));
4662
4808
  }
4663
4809
  arg1 = reinterpret_cast< TagLib::MPEG::File * >(argp1);
4664
- result = (long)(arg1)->lastFrameOffset();
4665
- vresult = SWIG_From_long(static_cast< long >(result));
4810
+ result = (TagLib::offset_t)(arg1)->lastFrameOffset();
4811
+ {
4812
+ vresult = taglib_offset_t_to_ruby_int(result);
4813
+ }
4666
4814
  return vresult;
4667
4815
  fail:
4668
4816
  return Qnil;
@@ -4765,12 +4913,12 @@ fail:
4765
4913
 
4766
4914
  /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
4767
4915
 
4768
- static void *_p_TagLib__MPEG__FileTo_p_TagLib__File(void *x, int *SWIGUNUSEDPARM(newmemory)) {
4769
- return (void *)((TagLib::File *) ((TagLib::MPEG::File *) x));
4770
- }
4771
4916
  static void *_p_TagLib__MPEG__PropertiesTo_p_TagLib__AudioProperties(void *x, int *SWIGUNUSEDPARM(newmemory)) {
4772
4917
  return (void *)((TagLib::AudioProperties *) ((TagLib::MPEG::Properties *) x));
4773
4918
  }
4919
+ static void *_p_TagLib__MPEG__FileTo_p_TagLib__File(void *x, int *SWIGUNUSEDPARM(newmemory)) {
4920
+ return (void *)((TagLib::File *) ((TagLib::MPEG::File *) x));
4921
+ }
4774
4922
  static swig_type_info _swigt__p_TagLib__APE__Tag = {"_p_TagLib__APE__Tag", "TagLib::APE::Tag *", 0, 0, (void*)0, 0};
4775
4923
  static swig_type_info _swigt__p_TagLib__AudioProperties = {"_p_TagLib__AudioProperties", "TagLib::AudioProperties *", 0, 0, (void*)0, 0};
4776
4924
  static swig_type_info _swigt__p_TagLib__File = {"_p_TagLib__File", "TagLib::File *", 0, 0, (void*)0, 0};
@@ -4783,8 +4931,9 @@ static swig_type_info _swigt__p_TagLib__MPEG__Properties = {"_p_TagLib__MPEG__Pr
4783
4931
  static swig_type_info _swigt__p_TagLib__MPEG__XingHeader = {"_p_TagLib__MPEG__XingHeader", "TagLib::MPEG::XingHeader *", 0, 0, (void*)0, 0};
4784
4932
  static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0};
4785
4933
  static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
4934
+ static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0};
4786
4935
  static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0};
4787
- static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|TagLib::uint *", 0, 0, (void*)0, 0};
4936
+ static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0};
4788
4937
  static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0};
4789
4938
  static swig_type_info _swigt__p_wchar_t = {"_p_wchar_t", "TagLib::wchar *|wchar_t *", 0, 0, (void*)0, 0};
4790
4939
 
@@ -4801,6 +4950,7 @@ static swig_type_info *swig_type_initial[] = {
4801
4950
  &_swigt__p_TagLib__MPEG__XingHeader,
4802
4951
  &_swigt__p_TagLib__Tag,
4803
4952
  &_swigt__p_char,
4953
+ &_swigt__p_long_long,
4804
4954
  &_swigt__p_unsigned_char,
4805
4955
  &_swigt__p_unsigned_int,
4806
4956
  &_swigt__p_unsigned_long,
@@ -4809,7 +4959,7 @@ static swig_type_info *swig_type_initial[] = {
4809
4959
 
4810
4960
  static swig_cast_info _swigc__p_TagLib__APE__Tag[] = { {&_swigt__p_TagLib__APE__Tag, 0, 0, 0},{0, 0, 0, 0}};
4811
4961
  static swig_cast_info _swigc__p_TagLib__AudioProperties[] = { {&_swigt__p_TagLib__AudioProperties, 0, 0, 0}, {&_swigt__p_TagLib__MPEG__Properties, _p_TagLib__MPEG__PropertiesTo_p_TagLib__AudioProperties, 0, 0},{0, 0, 0, 0}};
4812
- static swig_cast_info _swigc__p_TagLib__File[] = { {&_swigt__p_TagLib__MPEG__File, _p_TagLib__MPEG__FileTo_p_TagLib__File, 0, 0}, {&_swigt__p_TagLib__File, 0, 0, 0},{0, 0, 0, 0}};
4962
+ static swig_cast_info _swigc__p_TagLib__File[] = { {&_swigt__p_TagLib__File, 0, 0, 0}, {&_swigt__p_TagLib__MPEG__File, _p_TagLib__MPEG__FileTo_p_TagLib__File, 0, 0},{0, 0, 0, 0}};
4813
4963
  static swig_cast_info _swigc__p_TagLib__ID3v1__Tag[] = { {&_swigt__p_TagLib__ID3v1__Tag, 0, 0, 0},{0, 0, 0, 0}};
4814
4964
  static swig_cast_info _swigc__p_TagLib__ID3v2__FrameFactory[] = { {&_swigt__p_TagLib__ID3v2__FrameFactory, 0, 0, 0},{0, 0, 0, 0}};
4815
4965
  static swig_cast_info _swigc__p_TagLib__ID3v2__Tag[] = { {&_swigt__p_TagLib__ID3v2__Tag, 0, 0, 0},{0, 0, 0, 0}};
@@ -4819,6 +4969,7 @@ static swig_cast_info _swigc__p_TagLib__MPEG__Properties[] = { {&_swigt__p_TagL
4819
4969
  static swig_cast_info _swigc__p_TagLib__MPEG__XingHeader[] = { {&_swigt__p_TagLib__MPEG__XingHeader, 0, 0, 0},{0, 0, 0, 0}};
4820
4970
  static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__Tag, 0, 0, 0},{0, 0, 0, 0}};
4821
4971
  static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
4972
+ static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
4822
4973
  static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
4823
4974
  static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
4824
4975
  static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
@@ -4837,6 +4988,7 @@ static swig_cast_info *swig_cast_initial[] = {
4837
4988
  _swigc__p_TagLib__MPEG__XingHeader,
4838
4989
  _swigc__p_TagLib__Tag,
4839
4990
  _swigc__p_char,
4991
+ _swigc__p_long_long,
4840
4992
  _swigc__p_unsigned_char,
4841
4993
  _swigc__p_unsigned_int,
4842
4994
  _swigc__p_unsigned_long,
@@ -4898,9 +5050,12 @@ extern "C" {
4898
5050
  #define SWIGRUNTIME_DEBUG
4899
5051
  #endif
4900
5052
 
5053
+ #ifndef SWIG_INIT_CLIENT_DATA_TYPE
5054
+ #define SWIG_INIT_CLIENT_DATA_TYPE void *
5055
+ #endif
4901
5056
 
4902
5057
  SWIGRUNTIME void
4903
- SWIG_InitializeModule(void *clientdata) {
5058
+ SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) {
4904
5059
  size_t i;
4905
5060
  swig_module_info *module_head, *iter;
4906
5061
  int init;
@@ -5109,10 +5264,11 @@ SWIGEXPORT void Init_taglib_mpeg(void) {
5109
5264
  rb_define_method(SwigClassXingHeader.klass, "total_frames", VALUEFUNC(_wrap_XingHeader_total_frames), -1);
5110
5265
  rb_define_method(SwigClassXingHeader.klass, "total_size", VALUEFUNC(_wrap_XingHeader_total_size), -1);
5111
5266
  rb_define_method(SwigClassXingHeader.klass, "type", VALUEFUNC(_wrap_XingHeader_type), -1);
5112
- rb_define_singleton_method(SwigClassXingHeader.klass, "xing_header_offset", VALUEFUNC(_wrap_XingHeader_xing_header_offset), -1);
5113
5267
  SwigClassXingHeader.mark = 0;
5114
5268
  SwigClassXingHeader.destroy = (void (*)(void *)) free_TagLib_MPEG_XingHeader;
5115
5269
  SwigClassXingHeader.trackObjects = 1;
5270
+ rb_define_const(mMPEG, "V3", SWIG_From_int(static_cast< int >(TagLib::ID3v2::v3)));
5271
+ rb_define_const(mMPEG, "V4", SWIG_From_int(static_cast< int >(TagLib::ID3v2::v4)));
5116
5272
 
5117
5273
  SwigClassHeader.klass = rb_define_class_under(mMPEG, "Header", rb_cObject);
5118
5274
  SWIG_TypeClientData(SWIGTYPE_p_TagLib__MPEG__Header, (void *) &SwigClassHeader);
@@ -5122,6 +5278,7 @@ SWIGEXPORT void Init_taglib_mpeg(void) {
5122
5278
  rb_define_const(SwigClassHeader.klass, "Version1", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::Version1)));
5123
5279
  rb_define_const(SwigClassHeader.klass, "Version2", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::Version2)));
5124
5280
  rb_define_const(SwigClassHeader.klass, "Version2_5", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::Version2_5)));
5281
+ rb_define_const(SwigClassHeader.klass, "Version4", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::Version4)));
5125
5282
  rb_define_method(SwigClassHeader.klass, "version", VALUEFUNC(_wrap_Header_version), -1);
5126
5283
  rb_define_method(SwigClassHeader.klass, "layer", VALUEFUNC(_wrap_Header_layer), -1);
5127
5284
  rb_define_method(SwigClassHeader.klass, "protection_enabled", VALUEFUNC(_wrap_Header_protection_enabled), -1);
@@ -5133,6 +5290,16 @@ SWIGEXPORT void Init_taglib_mpeg(void) {
5133
5290
  rb_define_const(SwigClassHeader.klass, "DualChannel", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::DualChannel)));
5134
5291
  rb_define_const(SwigClassHeader.klass, "SingleChannel", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::SingleChannel)));
5135
5292
  rb_define_method(SwigClassHeader.klass, "channel_mode", VALUEFUNC(_wrap_Header_channel_mode), -1);
5293
+ rb_define_const(SwigClassHeader.klass, "Custom", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::Custom)));
5294
+ rb_define_const(SwigClassHeader.klass, "FrontCenter", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::FrontCenter)));
5295
+ rb_define_const(SwigClassHeader.klass, "FrontLeftRight", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::FrontLeftRight)));
5296
+ rb_define_const(SwigClassHeader.klass, "FrontCenterLeftRight", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::FrontCenterLeftRight)));
5297
+ rb_define_const(SwigClassHeader.klass, "FrontCenterLeftRightBackCenter", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::FrontCenterLeftRightBackCenter)));
5298
+ rb_define_const(SwigClassHeader.klass, "FrontCenterLeftRightBackLeftRight", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::FrontCenterLeftRightBackLeftRight)));
5299
+ rb_define_const(SwigClassHeader.klass, "FrontCenterLeftRightBackLeftRightLFE", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::FrontCenterLeftRightBackLeftRightLFE)));
5300
+ rb_define_const(SwigClassHeader.klass, "FrontCenterLeftRightSideLeftRightBackLeftRightLFE", SWIG_From_int(static_cast< int >(TagLib::MPEG::Header::FrontCenterLeftRightSideLeftRightBackLeftRightLFE)));
5301
+ rb_define_method(SwigClassHeader.klass, "channel_configuration", VALUEFUNC(_wrap_Header_channel_configuration), -1);
5302
+ rb_define_method(SwigClassHeader.klass, "is_adts", VALUEFUNC(_wrap_Header_is_adts), -1);
5136
5303
  rb_define_method(SwigClassHeader.klass, "copyrighted?", VALUEFUNC(_wrap_Header_copyrightedq___), -1);
5137
5304
  rb_define_method(SwigClassHeader.klass, "original?", VALUEFUNC(_wrap_Header_originalq___), -1);
5138
5305
  rb_define_method(SwigClassHeader.klass, "frame_length", VALUEFUNC(_wrap_Header_frame_length), -1);
@@ -5145,7 +5312,6 @@ SWIGEXPORT void Init_taglib_mpeg(void) {
5145
5312
  SWIG_TypeClientData(SWIGTYPE_p_TagLib__MPEG__Properties, (void *) &SwigClassProperties);
5146
5313
  rb_define_alloc_func(SwigClassProperties.klass, _wrap_Properties_allocate);
5147
5314
  rb_define_method(SwigClassProperties.klass, "initialize", VALUEFUNC(_wrap_new_Properties), -1);
5148
- rb_define_method(SwigClassProperties.klass, "length_in_seconds", VALUEFUNC(_wrap_Properties_length_in_seconds), -1);
5149
5315
  rb_define_method(SwigClassProperties.klass, "length_in_milliseconds", VALUEFUNC(_wrap_Properties_length_in_milliseconds), -1);
5150
5316
  rb_define_method(SwigClassProperties.klass, "bitrate", VALUEFUNC(_wrap_Properties_bitrate), -1);
5151
5317
  rb_define_method(SwigClassProperties.klass, "sample_rate", VALUEFUNC(_wrap_Properties_sample_rate), -1);
@@ -5155,6 +5321,8 @@ SWIGEXPORT void Init_taglib_mpeg(void) {
5155
5321
  rb_define_method(SwigClassProperties.klass, "layer", VALUEFUNC(_wrap_Properties_layer), -1);
5156
5322
  rb_define_method(SwigClassProperties.klass, "protection_enabled", VALUEFUNC(_wrap_Properties_protection_enabled), -1);
5157
5323
  rb_define_method(SwigClassProperties.klass, "channel_mode", VALUEFUNC(_wrap_Properties_channel_mode), -1);
5324
+ rb_define_method(SwigClassProperties.klass, "channel_configuration", VALUEFUNC(_wrap_Properties_channel_configuration), -1);
5325
+ rb_define_method(SwigClassProperties.klass, "is_adts", VALUEFUNC(_wrap_Properties_is_adts), -1);
5158
5326
  rb_define_method(SwigClassProperties.klass, "copyrighted?", VALUEFUNC(_wrap_Properties_copyrightedq___), -1);
5159
5327
  rb_define_method(SwigClassProperties.klass, "original?", VALUEFUNC(_wrap_Properties_originalq___), -1);
5160
5328
  SwigClassProperties.mark = 0;
@@ -5177,7 +5345,6 @@ SWIGEXPORT void Init_taglib_mpeg(void) {
5177
5345
  rb_define_method(SwigClassFile.klass, "id3v1_tag", VALUEFUNC(_wrap_File_id3v1_tag), -1);
5178
5346
  rb_define_method(SwigClassFile.klass, "apetag", VALUEFUNC(_wrap_File_apetag), -1);
5179
5347
  rb_define_method(SwigClassFile.klass, "strip", VALUEFUNC(_wrap_File_strip), -1);
5180
- rb_define_method(SwigClassFile.klass, "set_id3v2_frame_factory", VALUEFUNC(_wrap_File_set_id3v2_frame_factory), -1);
5181
5348
  rb_define_method(SwigClassFile.klass, "first_frame_offset", VALUEFUNC(_wrap_File_first_frame_offset), -1);
5182
5349
  rb_define_method(SwigClassFile.klass, "next_frame_offset", VALUEFUNC(_wrap_File_next_frame_offset), -1);
5183
5350
  rb_define_method(SwigClassFile.klass, "previous_frame_offset", VALUEFUNC(_wrap_File_previous_frame_offset), -1);