taglib-ruby 0.6.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +1 -1
  3. data/{CHANGES.md → CHANGELOG.md} +46 -11
  4. data/README.md +61 -17
  5. data/Rakefile +12 -3
  6. data/docs/taglib/aiff.rb +95 -0
  7. data/docs/taglib/base.rb +30 -2
  8. data/docs/taglib/flac.rb +60 -4
  9. data/docs/taglib/id3v1.rb +29 -0
  10. data/docs/taglib/id3v2.rb +22 -3
  11. data/docs/taglib/mp4.rb +124 -13
  12. data/docs/taglib/mpeg.rb +30 -1
  13. data/docs/taglib/ogg.rb +47 -5
  14. data/docs/taglib/riff.rb +3 -0
  15. data/docs/taglib/vorbis.rb +1 -1
  16. data/docs/taglib/wav.rb +116 -0
  17. data/ext/extconf_common.rb +24 -3
  18. data/ext/taglib_aiff/extconf.rb +4 -0
  19. data/ext/taglib_aiff/taglib_aiff.i +84 -0
  20. data/ext/taglib_aiff/taglib_aiff_wrap.cxx +3111 -0
  21. data/ext/taglib_base/includes.i +34 -5
  22. data/ext/taglib_base/taglib_base.i +42 -2
  23. data/ext/taglib_base/taglib_base_wrap.cxx +226 -186
  24. data/ext/taglib_flac/taglib_flac.i +21 -18
  25. data/ext/taglib_flac/taglib_flac_wrap.cxx +519 -955
  26. data/ext/taglib_flac_picture/extconf.rb +4 -0
  27. data/ext/taglib_flac_picture/includes.i +15 -0
  28. data/ext/taglib_flac_picture/taglib_flac_picture.i +15 -0
  29. data/ext/taglib_flac_picture/taglib_flac_picture_wrap.cxx +3087 -0
  30. data/ext/taglib_id3v1/taglib_id3v1.i +19 -0
  31. data/ext/taglib_id3v1/taglib_id3v1_wrap.cxx +391 -193
  32. data/ext/taglib_id3v2/relativevolumeframe.i +4 -17
  33. data/ext/taglib_id3v2/taglib_id3v2.i +72 -2
  34. data/ext/taglib_id3v2/taglib_id3v2_wrap.cxx +3051 -1113
  35. data/ext/taglib_mp4/taglib_mp4.i +101 -20
  36. data/ext/taglib_mp4/taglib_mp4_wrap.cxx +1088 -282
  37. data/ext/taglib_mpeg/taglib_mpeg.i +11 -16
  38. data/ext/taglib_mpeg/taglib_mpeg_wrap.cxx +646 -317
  39. data/ext/taglib_ogg/taglib_ogg.i +11 -0
  40. data/ext/taglib_ogg/taglib_ogg_wrap.cxx +478 -192
  41. data/ext/taglib_vorbis/taglib_vorbis.i +8 -0
  42. data/ext/taglib_vorbis/taglib_vorbis_wrap.cxx +202 -156
  43. data/ext/taglib_wav/extconf.rb +4 -0
  44. data/ext/taglib_wav/taglib_wav.i +90 -0
  45. data/ext/taglib_wav/taglib_wav_wrap.cxx +3423 -0
  46. data/lib/taglib.rb +2 -0
  47. data/lib/taglib/aiff.rb +7 -0
  48. data/lib/taglib/mp4.rb +2 -1
  49. data/lib/taglib/version.rb +2 -2
  50. data/lib/taglib/wav.rb +11 -0
  51. data/taglib-ruby.gemspec +42 -8
  52. data/tasks/ext.rake +48 -20
  53. data/tasks/gemspec_check.rake +1 -1
  54. data/tasks/swig.rake +36 -2
  55. data/test/aiff_examples_test.rb +39 -0
  56. data/test/aiff_file_test.rb +103 -0
  57. data/test/aiff_file_write_test.rb +88 -0
  58. data/test/data/Makefile +8 -2
  59. data/test/data/aiff-sample.aiff +0 -0
  60. data/test/data/flac_nopic.flac +0 -0
  61. data/test/data/vorbis-create.cpp +20 -1
  62. data/test/data/vorbis.oga +0 -0
  63. data/test/data/wav-create.cpp +55 -0
  64. data/test/data/wav-dump.cpp +74 -0
  65. data/test/data/wav-sample.wav +0 -0
  66. data/test/file_test.rb +21 -0
  67. data/test/fileref_properties_test.rb +1 -1
  68. data/test/flac_file_test.rb +45 -30
  69. data/test/flac_picture_memory_test.rb +43 -0
  70. data/test/id3v1_genres_test.rb +23 -0
  71. data/test/id3v1_tag_test.rb +1 -0
  72. data/test/id3v2_frames_test.rb +64 -0
  73. data/test/id3v2_tag_test.rb +6 -6
  74. data/test/id3v2_unknown_frames_test.rb +30 -0
  75. data/test/id3v2_write_test.rb +10 -13
  76. data/test/mp4_file_test.rb +33 -4
  77. data/test/mp4_file_write_test.rb +5 -5
  78. data/test/mp4_items_test.rb +83 -29
  79. data/test/mpeg_file_test.rb +120 -7
  80. data/test/vorbis_file_test.rb +2 -2
  81. data/test/vorbis_tag_test.rb +61 -7
  82. data/test/wav_examples_test.rb +42 -0
  83. data/test/wav_file_test.rb +108 -0
  84. data/test/wav_file_write_test.rb +113 -0
  85. metadata +86 -56
@@ -10,7 +10,15 @@
10
10
 
11
11
  %freefunc TagLib::Vorbis::File "free_taglib_vorbis_file";
12
12
 
13
+ // Ignore IOStream and all the constructors using it.
14
+ %ignore IOStream;
15
+ %ignore TagLib::Vorbis::File::File(IOStream *, bool, Properties::ReadStyle);
16
+ %ignore TagLib::Vorbis::File::File(IOStream *, bool);
17
+ %ignore TagLib::Vorbis::File::File(IOStream *);
18
+
19
+ %ignore TagLib::Vorbis::Properties::length; // Deprecated.
13
20
  %include <taglib/vorbisproperties.h>
21
+
14
22
  %include <taglib/vorbisfile.h>
15
23
 
16
24
  %begin %{
@@ -1,11 +1,11 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 2.0.9
4
- *
5
- * This file is not intended to be easily readable and contains a number of
3
+ * Version 3.0.7
4
+ *
5
+ * This file is not intended to be easily readable and contains a number of
6
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.
7
+ * changes to this file unless you know what you are doing--modify the SWIG
8
+ * interface file instead.
9
9
  * ----------------------------------------------------------------------------- */
10
10
 
11
11
  static void free_taglib_vorbis_file(void *ptr);
@@ -68,28 +68,28 @@ template <typename T> T SwigValueInit() {
68
68
  #ifndef SWIGUNUSED
69
69
  # if defined(__GNUC__)
70
70
  # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
71
- # define SWIGUNUSED __attribute__ ((__unused__))
71
+ # define SWIGUNUSED __attribute__ ((__unused__))
72
72
  # else
73
73
  # define SWIGUNUSED
74
74
  # endif
75
75
  # elif defined(__ICC)
76
- # define SWIGUNUSED __attribute__ ((__unused__))
76
+ # define SWIGUNUSED __attribute__ ((__unused__))
77
77
  # else
78
- # define SWIGUNUSED
78
+ # define SWIGUNUSED
79
79
  # endif
80
80
  #endif
81
81
 
82
82
  #ifndef SWIG_MSC_UNSUPPRESS_4505
83
83
  # if defined(_MSC_VER)
84
84
  # pragma warning(disable : 4505) /* unreferenced local function has been removed */
85
- # endif
85
+ # endif
86
86
  #endif
87
87
 
88
88
  #ifndef SWIGUNUSEDPARM
89
89
  # ifdef __cplusplus
90
90
  # define SWIGUNUSEDPARM(p)
91
91
  # else
92
- # define SWIGUNUSEDPARM(p) p SWIGUNUSED
92
+ # define SWIGUNUSEDPARM(p) p SWIGUNUSED
93
93
  # endif
94
94
  #endif
95
95
 
@@ -132,7 +132,7 @@ template <typename T> T SwigValueInit() {
132
132
  # define SWIGSTDCALL __stdcall
133
133
  # else
134
134
  # define SWIGSTDCALL
135
- # endif
135
+ # endif
136
136
  #endif
137
137
 
138
138
  /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
@@ -145,6 +145,19 @@ template <typename T> T SwigValueInit() {
145
145
  # define _SCL_SECURE_NO_DEPRECATE
146
146
  #endif
147
147
 
148
+ /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
149
+ #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
150
+ # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
151
+ #endif
152
+
153
+ /* Intel's compiler complains if a variable which was never initialised is
154
+ * cast to void, which is a common idiom which we use to indicate that we
155
+ * are aware a variable isn't used. So we just silence that warning.
156
+ * See: https://github.com/swig/swig/issues/192 for more discussion.
157
+ */
158
+ #ifdef __INTEL_COMPILER
159
+ # pragma warning disable 592
160
+ #endif
148
161
 
149
162
  /* -----------------------------------------------------------------------------
150
163
  * This section contains generic SWIG labels for method/variable
@@ -177,28 +190,28 @@ template <typename T> T SwigValueInit() {
177
190
  #ifndef SWIGUNUSED
178
191
  # if defined(__GNUC__)
179
192
  # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
180
- # define SWIGUNUSED __attribute__ ((__unused__))
193
+ # define SWIGUNUSED __attribute__ ((__unused__))
181
194
  # else
182
195
  # define SWIGUNUSED
183
196
  # endif
184
197
  # elif defined(__ICC)
185
- # define SWIGUNUSED __attribute__ ((__unused__))
198
+ # define SWIGUNUSED __attribute__ ((__unused__))
186
199
  # else
187
- # define SWIGUNUSED
200
+ # define SWIGUNUSED
188
201
  # endif
189
202
  #endif
190
203
 
191
204
  #ifndef SWIG_MSC_UNSUPPRESS_4505
192
205
  # if defined(_MSC_VER)
193
206
  # pragma warning(disable : 4505) /* unreferenced local function has been removed */
194
- # endif
207
+ # endif
195
208
  #endif
196
209
 
197
210
  #ifndef SWIGUNUSEDPARM
198
211
  # ifdef __cplusplus
199
212
  # define SWIGUNUSEDPARM(p)
200
213
  # else
201
- # define SWIGUNUSEDPARM(p) p SWIGUNUSED
214
+ # define SWIGUNUSEDPARM(p) p SWIGUNUSED
202
215
  # endif
203
216
  #endif
204
217
 
@@ -241,7 +254,7 @@ template <typename T> T SwigValueInit() {
241
254
  # define SWIGSTDCALL __stdcall
242
255
  # else
243
256
  # define SWIGSTDCALL
244
- # endif
257
+ # endif
245
258
  #endif
246
259
 
247
260
  /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
@@ -254,6 +267,19 @@ template <typename T> T SwigValueInit() {
254
267
  # define _SCL_SECURE_NO_DEPRECATE
255
268
  #endif
256
269
 
270
+ /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
271
+ #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
272
+ # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
273
+ #endif
274
+
275
+ /* Intel's compiler complains if a variable which was never initialised is
276
+ * cast to void, which is a common idiom which we use to indicate that we
277
+ * are aware a variable isn't used. So we just silence that warning.
278
+ * See: https://github.com/swig/swig/issues/192 for more discussion.
279
+ */
280
+ #ifdef __INTEL_COMPILER
281
+ # pragma warning disable 592
282
+ #endif
257
283
 
258
284
  /* -----------------------------------------------------------------------------
259
285
  * swigrun.swg
@@ -279,7 +305,7 @@ template <typename T> T SwigValueInit() {
279
305
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
280
306
  creating a static or dynamic library from the SWIG runtime code.
281
307
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
282
-
308
+
283
309
  But only do this if strictly necessary, ie, if you have problems
284
310
  with your compiler or suchlike.
285
311
  */
@@ -305,16 +331,16 @@ template <typename T> T SwigValueInit() {
305
331
  #define SWIG_POINTER_OWN 0x1
306
332
 
307
333
 
308
- /*
334
+ /*
309
335
  Flags/methods for returning states.
310
-
311
- The SWIG conversion methods, as ConvertPtr, return an integer
336
+
337
+ The SWIG conversion methods, as ConvertPtr, return an integer
312
338
  that tells if the conversion was successful or not. And if not,
313
339
  an error code can be returned (see swigerrors.swg for the codes).
314
-
340
+
315
341
  Use the following macros/flags to set or process the returning
316
342
  states.
317
-
343
+
318
344
  In old versions of SWIG, code such as the following was usually written:
319
345
 
320
346
  if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
@@ -347,23 +373,23 @@ template <typename T> T SwigValueInit() {
347
373
  } else {
348
374
  // fail code
349
375
  }
350
-
376
+
351
377
  I.e., now SWIG_ConvertPtr can return new objects and you can
352
378
  identify the case and take care of the deallocation. Of course that
353
379
  also requires SWIG_ConvertPtr to return new result values, such as
354
380
 
355
- int SWIG_ConvertPtr(obj, ptr,...) {
356
- if (<obj is ok>) {
357
- if (<need new object>) {
358
- *ptr = <ptr to new allocated object>;
359
- return SWIG_NEWOBJ;
360
- } else {
361
- *ptr = <ptr to old object>;
362
- return SWIG_OLDOBJ;
363
- }
364
- } else {
365
- return SWIG_BADOBJ;
366
- }
381
+ int SWIG_ConvertPtr(obj, ptr,...) {
382
+ if (<obj is ok>) {
383
+ if (<need new object>) {
384
+ *ptr = <ptr to new allocated object>;
385
+ return SWIG_NEWOBJ;
386
+ } else {
387
+ *ptr = <ptr to old object>;
388
+ return SWIG_OLDOBJ;
389
+ }
390
+ } else {
391
+ return SWIG_BADOBJ;
392
+ }
367
393
  }
368
394
 
369
395
  Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
@@ -377,17 +403,17 @@ template <typename T> T SwigValueInit() {
377
403
  int fooi(int);
378
404
 
379
405
  and you call
380
-
406
+
381
407
  food(1) // cast rank '1' (1 -> 1.0)
382
408
  fooi(1) // cast rank '0'
383
409
 
384
410
  just use the SWIG_AddCast()/SWIG_CheckState()
385
411
  */
386
412
 
387
- #define SWIG_OK (0)
413
+ #define SWIG_OK (0)
388
414
  #define SWIG_ERROR (-1)
389
415
  #define SWIG_IsOK(r) (r >= 0)
390
- #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
416
+ #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
391
417
 
392
418
  /* The CastRankLimit says how many bits are used for the cast rank */
393
419
  #define SWIG_CASTRANKLIMIT (1 << 8)
@@ -418,14 +444,14 @@ template <typename T> T SwigValueInit() {
418
444
  # endif
419
445
  # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
420
446
  # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
421
- SWIGINTERNINLINE int SWIG_AddCast(int r) {
447
+ SWIGINTERNINLINE int SWIG_AddCast(int r) {
422
448
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
423
449
  }
424
- SWIGINTERNINLINE int SWIG_CheckState(int r) {
425
- return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
450
+ SWIGINTERNINLINE int SWIG_CheckState(int r) {
451
+ return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
426
452
  }
427
453
  #else /* no cast-rank mode */
428
- # define SWIG_AddCast
454
+ # define SWIG_AddCast(r) (r)
429
455
  # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
430
456
  #endif
431
457
 
@@ -469,7 +495,7 @@ typedef struct swig_module_info {
469
495
  void *clientdata; /* Language specific module data */
470
496
  } swig_module_info;
471
497
 
472
- /*
498
+ /*
473
499
  Compare two type names skipping the space characters, therefore
474
500
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
475
501
 
@@ -489,18 +515,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
489
515
 
490
516
  /*
491
517
  Check type equivalence in a name list like <name1>|<name2>|...
492
- Return 0 if not equal, 1 if equal
518
+ Return 0 if equal, -1 if nb < tb, 1 if nb > tb
493
519
  */
494
520
  SWIGRUNTIME int
495
- SWIG_TypeEquiv(const char *nb, const char *tb) {
496
- int equiv = 0;
521
+ SWIG_TypeCmp(const char *nb, const char *tb) {
522
+ int equiv = 1;
497
523
  const char* te = tb + strlen(tb);
498
524
  const char* ne = nb;
499
- while (!equiv && *ne) {
525
+ while (equiv != 0 && *ne) {
500
526
  for (nb = ne; *ne; ++ne) {
501
527
  if (*ne == '|') break;
502
528
  }
503
- equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
529
+ equiv = SWIG_TypeNameComp(nb, ne, tb, te);
504
530
  if (*ne) ++ne;
505
531
  }
506
532
  return equiv;
@@ -508,24 +534,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
508
534
 
509
535
  /*
510
536
  Check type equivalence in a name list like <name1>|<name2>|...
511
- Return 0 if equal, -1 if nb < tb, 1 if nb > tb
537
+ Return 0 if not equal, 1 if equal
512
538
  */
513
539
  SWIGRUNTIME int
514
- SWIG_TypeCompare(const char *nb, const char *tb) {
515
- int equiv = 0;
516
- const char* te = tb + strlen(tb);
517
- const char* ne = nb;
518
- while (!equiv && *ne) {
519
- for (nb = ne; *ne; ++ne) {
520
- if (*ne == '|') break;
521
- }
522
- equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
523
- if (*ne) ++ne;
524
- }
525
- return equiv;
540
+ SWIG_TypeEquiv(const char *nb, const char *tb) {
541
+ return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
526
542
  }
527
543
 
528
-
529
544
  /*
530
545
  Check the typename
531
546
  */
@@ -553,7 +568,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
553
568
  return 0;
554
569
  }
555
570
 
556
- /*
571
+ /*
557
572
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
558
573
  */
559
574
  SWIGRUNTIME swig_cast_info *
@@ -588,7 +603,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
588
603
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
589
604
  }
590
605
 
591
- /*
606
+ /*
592
607
  Dynamic pointer casting. Down an inheritance hierarchy
593
608
  */
594
609
  SWIGRUNTIME swig_type_info *
@@ -632,7 +647,7 @@ SWIG_TypePrettyName(const swig_type_info *type) {
632
647
  return type->name;
633
648
  }
634
649
 
635
- /*
650
+ /*
636
651
  Set the clientdata field for a type
637
652
  */
638
653
  SWIGRUNTIME void
@@ -640,14 +655,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
640
655
  swig_cast_info *cast = ti->cast;
641
656
  /* if (ti->clientdata == clientdata) return; */
642
657
  ti->clientdata = clientdata;
643
-
658
+
644
659
  while (cast) {
645
660
  if (!cast->converter) {
646
661
  swig_type_info *tc = cast->type;
647
662
  if (!tc->clientdata) {
648
663
  SWIG_TypeClientData(tc, clientdata);
649
664
  }
650
- }
665
+ }
651
666
  cast = cast->next;
652
667
  }
653
668
  }
@@ -656,31 +671,31 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
656
671
  SWIG_TypeClientData(ti, clientdata);
657
672
  ti->owndata = 1;
658
673
  }
659
-
674
+
660
675
  /*
661
676
  Search for a swig_type_info structure only by mangled name
662
677
  Search is a O(log #types)
663
-
664
- We start searching at module start, and finish searching when start == end.
678
+
679
+ We start searching at module start, and finish searching when start == end.
665
680
  Note: if start == end at the beginning of the function, we go all the way around
666
681
  the circular list.
667
682
  */
668
683
  SWIGRUNTIME swig_type_info *
669
- SWIG_MangledTypeQueryModule(swig_module_info *start,
670
- swig_module_info *end,
684
+ SWIG_MangledTypeQueryModule(swig_module_info *start,
685
+ swig_module_info *end,
671
686
  const char *name) {
672
687
  swig_module_info *iter = start;
673
688
  do {
674
689
  if (iter->size) {
675
- register size_t l = 0;
676
- register size_t r = iter->size - 1;
690
+ size_t l = 0;
691
+ size_t r = iter->size - 1;
677
692
  do {
678
693
  /* since l+r >= 0, we can (>> 1) instead (/ 2) */
679
- register size_t i = (l + r) >> 1;
694
+ size_t i = (l + r) >> 1;
680
695
  const char *iname = iter->types[i]->name;
681
696
  if (iname) {
682
- register int compare = strcmp(name, iname);
683
- if (compare == 0) {
697
+ int compare = strcmp(name, iname);
698
+ if (compare == 0) {
684
699
  return iter->types[i];
685
700
  } else if (compare < 0) {
686
701
  if (i) {
@@ -705,14 +720,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
705
720
  Search for a swig_type_info structure for either a mangled name or a human readable name.
706
721
  It first searches the mangled names of the types, which is a O(log #types)
707
722
  If a type is not found it then searches the human readable names, which is O(#types).
708
-
709
- We start searching at module start, and finish searching when start == end.
723
+
724
+ We start searching at module start, and finish searching when start == end.
710
725
  Note: if start == end at the beginning of the function, we go all the way around
711
726
  the circular list.
712
727
  */
713
728
  SWIGRUNTIME swig_type_info *
714
- SWIG_TypeQueryModule(swig_module_info *start,
715
- swig_module_info *end,
729
+ SWIG_TypeQueryModule(swig_module_info *start,
730
+ swig_module_info *end,
716
731
  const char *name) {
717
732
  /* STEP 1: Search the name field using binary search */
718
733
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
@@ -723,7 +738,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
723
738
  of the str field (the human readable name) */
724
739
  swig_module_info *iter = start;
725
740
  do {
726
- register size_t i = 0;
741
+ size_t i = 0;
727
742
  for (; i < iter->size; ++i) {
728
743
  if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
729
744
  return iter->types[i];
@@ -731,56 +746,56 @@ SWIG_TypeQueryModule(swig_module_info *start,
731
746
  iter = iter->next;
732
747
  } while (iter != end);
733
748
  }
734
-
749
+
735
750
  /* neither found a match */
736
751
  return 0;
737
752
  }
738
753
 
739
- /*
754
+ /*
740
755
  Pack binary data into a string
741
756
  */
742
757
  SWIGRUNTIME char *
743
758
  SWIG_PackData(char *c, void *ptr, size_t sz) {
744
759
  static const char hex[17] = "0123456789abcdef";
745
- register const unsigned char *u = (unsigned char *) ptr;
746
- register const unsigned char *eu = u + sz;
760
+ const unsigned char *u = (unsigned char *) ptr;
761
+ const unsigned char *eu = u + sz;
747
762
  for (; u != eu; ++u) {
748
- register unsigned char uu = *u;
763
+ unsigned char uu = *u;
749
764
  *(c++) = hex[(uu & 0xf0) >> 4];
750
765
  *(c++) = hex[uu & 0xf];
751
766
  }
752
767
  return c;
753
768
  }
754
769
 
755
- /*
770
+ /*
756
771
  Unpack binary data from a string
757
772
  */
758
773
  SWIGRUNTIME const char *
759
774
  SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
760
- register unsigned char *u = (unsigned char *) ptr;
761
- register const unsigned char *eu = u + sz;
775
+ unsigned char *u = (unsigned char *) ptr;
776
+ const unsigned char *eu = u + sz;
762
777
  for (; u != eu; ++u) {
763
- register char d = *(c++);
764
- register unsigned char uu;
778
+ char d = *(c++);
779
+ unsigned char uu;
765
780
  if ((d >= '0') && (d <= '9'))
766
781
  uu = ((d - '0') << 4);
767
782
  else if ((d >= 'a') && (d <= 'f'))
768
783
  uu = ((d - ('a'-10)) << 4);
769
- else
784
+ else
770
785
  return (char *) 0;
771
786
  d = *(c++);
772
787
  if ((d >= '0') && (d <= '9'))
773
788
  uu |= (d - '0');
774
789
  else if ((d >= 'a') && (d <= 'f'))
775
790
  uu |= (d - ('a'-10));
776
- else
791
+ else
777
792
  return (char *) 0;
778
793
  *u = uu;
779
794
  }
780
795
  return c;
781
796
  }
782
797
 
783
- /*
798
+ /*
784
799
  Pack 'void *' into a string buffer.
785
800
  */
786
801
  SWIGRUNTIME char *
@@ -840,18 +855,18 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
840
855
  #endif
841
856
 
842
857
  /* Errors in SWIG */
843
- #define SWIG_UnknownError -1
844
- #define SWIG_IOError -2
845
- #define SWIG_RuntimeError -3
846
- #define SWIG_IndexError -4
847
- #define SWIG_TypeError -5
848
- #define SWIG_DivisionByZero -6
849
- #define SWIG_OverflowError -7
850
- #define SWIG_SyntaxError -8
851
- #define SWIG_ValueError -9
858
+ #define SWIG_UnknownError -1
859
+ #define SWIG_IOError -2
860
+ #define SWIG_RuntimeError -3
861
+ #define SWIG_IndexError -4
862
+ #define SWIG_TypeError -5
863
+ #define SWIG_DivisionByZero -6
864
+ #define SWIG_OverflowError -7
865
+ #define SWIG_SyntaxError -8
866
+ #define SWIG_ValueError -9
852
867
  #define SWIG_SystemError -10
853
868
  #define SWIG_AttributeError -11
854
- #define SWIG_MemoryError -12
869
+ #define SWIG_MemoryError -12
855
870
  #define SWIG_NullReferenceError -13
856
871
 
857
872
 
@@ -1517,14 +1532,13 @@ SWIG_Ruby_InitRuntime(void)
1517
1532
  SWIGRUNTIME void
1518
1533
  SWIG_Ruby_define_class(swig_type_info *type)
1519
1534
  {
1520
- VALUE klass;
1521
1535
  char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1522
1536
  sprintf(klass_name, "TYPE%s", type->name);
1523
1537
  if (NIL_P(_cSWIG_Pointer)) {
1524
1538
  _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
1525
1539
  rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
1526
1540
  }
1527
- klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1541
+ rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1528
1542
  free((void *) klass_name);
1529
1543
  }
1530
1544
 
@@ -1777,7 +1791,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
1777
1791
  SWIGINTERN
1778
1792
  int SWIG_Ruby_isCallable( VALUE proc )
1779
1793
  {
1780
- if ( rb_respond_to( proc, swig_call_id ) == Qtrue )
1794
+ if ( rb_respond_to( proc, swig_call_id ) )
1781
1795
  return 1;
1782
1796
  return 0;
1783
1797
  }
@@ -1790,7 +1804,7 @@ int SWIG_Ruby_isCallable( VALUE proc )
1790
1804
  SWIGINTERN
1791
1805
  int SWIG_Ruby_arity( VALUE proc, int minimal )
1792
1806
  {
1793
- if ( rb_respond_to( proc, swig_arity_id ) == Qtrue )
1807
+ if ( rb_respond_to( proc, swig_arity_id ) )
1794
1808
  {
1795
1809
  VALUE num = rb_funcall( proc, swig_arity_id, 0 );
1796
1810
  int arity = NUM2INT(num);
@@ -1819,17 +1833,18 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
1819
1833
  #define SWIGTYPE_p_MapT_TagLib__String_TagLib__StringList_t swig_types[0]
1820
1834
  #define SWIGTYPE_p_TagLib__AudioProperties swig_types[1]
1821
1835
  #define SWIGTYPE_p_TagLib__File swig_types[2]
1822
- #define SWIGTYPE_p_TagLib__Ogg__File swig_types[3]
1823
- #define SWIGTYPE_p_TagLib__Ogg__XiphComment swig_types[4]
1824
- #define SWIGTYPE_p_TagLib__Vorbis__File swig_types[5]
1825
- #define SWIGTYPE_p_TagLib__Vorbis__Properties swig_types[6]
1826
- #define SWIGTYPE_p_char swig_types[7]
1827
- #define SWIGTYPE_p_unsigned_char swig_types[8]
1828
- #define SWIGTYPE_p_unsigned_int swig_types[9]
1829
- #define SWIGTYPE_p_unsigned_long swig_types[10]
1830
- #define SWIGTYPE_p_wchar_t swig_types[11]
1831
- static swig_type_info *swig_types[13];
1832
- static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
1836
+ #define SWIGTYPE_p_TagLib__ListT_TagLib__FLAC__Picture_t swig_types[3]
1837
+ #define SWIGTYPE_p_TagLib__Ogg__File swig_types[4]
1838
+ #define SWIGTYPE_p_TagLib__Ogg__XiphComment swig_types[5]
1839
+ #define SWIGTYPE_p_TagLib__Vorbis__File swig_types[6]
1840
+ #define SWIGTYPE_p_TagLib__Vorbis__Properties swig_types[7]
1841
+ #define SWIGTYPE_p_char swig_types[8]
1842
+ #define SWIGTYPE_p_unsigned_char swig_types[9]
1843
+ #define SWIGTYPE_p_unsigned_int swig_types[10]
1844
+ #define SWIGTYPE_p_unsigned_long swig_types[11]
1845
+ #define SWIGTYPE_p_wchar_t swig_types[12]
1846
+ static swig_type_info *swig_types[14];
1847
+ static swig_module_info swig_module = {swig_types, 13, 0, 0, 0, 0};
1833
1848
  #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1834
1849
  #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1835
1850
 
@@ -1844,7 +1859,7 @@ static VALUE mVorbis;
1844
1859
  #define SWIG_RUBY_THREAD_END_BLOCK
1845
1860
 
1846
1861
 
1847
- #define SWIGVERSION 0x020009
1862
+ #define SWIGVERSION 0x030007
1848
1863
  #define SWIG_VERSION SWIGVERSION
1849
1864
 
1850
1865
 
@@ -1867,9 +1882,11 @@ static VALUE mVorbis;
1867
1882
  #if defined(HAVE_RUBY_ENCODING_H) && HAVE_RUBY_ENCODING_H
1868
1883
  # include <ruby/encoding.h>
1869
1884
  # define ASSOCIATE_UTF8_ENCODING(value) rb_enc_associate(value, rb_utf8_encoding());
1885
+ # define ASSOCIATE_FILESYSTEM_ENCODING(value) rb_enc_associate(value, rb_filesystem_encoding());
1870
1886
  # define CONVERT_TO_UTF8(value) rb_str_export_to_enc(value, rb_utf8_encoding())
1871
1887
  #else
1872
1888
  # define ASSOCIATE_UTF8_ENCODING(value) /* nothing */
1889
+ # define ASSOCIATE_FILESYSTEM_ENCODING(value)
1873
1890
  # define CONVERT_TO_UTF8(value) value
1874
1891
  #endif
1875
1892
 
@@ -1877,7 +1894,7 @@ VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) {
1877
1894
  if (byteVector.isNull()) {
1878
1895
  return Qnil;
1879
1896
  } else {
1880
- return rb_tainted_str_new(byteVector.data(), byteVector.size());
1897
+ return rb_str_new(byteVector.data(), byteVector.size());
1881
1898
  }
1882
1899
  }
1883
1900
 
@@ -1893,7 +1910,7 @@ VALUE taglib_string_to_ruby_string(const TagLib::String & string) {
1893
1910
  if (string.isNull()) {
1894
1911
  return Qnil;
1895
1912
  } else {
1896
- VALUE result = rb_tainted_str_new2(string.toCString(true));
1913
+ VALUE result = rb_str_new2(string.toCString(true));
1897
1914
  ASSOCIATE_UTF8_ENCODING(result);
1898
1915
  return result;
1899
1916
  }
@@ -1922,7 +1939,7 @@ TagLib::StringList ruby_array_to_taglib_string_list(VALUE ary) {
1922
1939
  return result;
1923
1940
  }
1924
1941
  for (long i = 0; i < RARRAY_LEN(ary); i++) {
1925
- VALUE e = RARRAY_PTR(ary)[i];
1942
+ VALUE e = rb_ary_entry(ary, i);
1926
1943
  TagLib::String s = ruby_string_to_taglib_string(e);
1927
1944
  result.append(s);
1928
1945
  }
@@ -1930,12 +1947,15 @@ TagLib::StringList ruby_array_to_taglib_string_list(VALUE ary) {
1930
1947
  }
1931
1948
 
1932
1949
  VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
1950
+ VALUE result;
1933
1951
  #ifdef _WIN32
1934
1952
  const char *s = (const char *) filename;
1935
- return rb_tainted_str_new2(s);
1953
+ result = rb_str_new2(s);
1936
1954
  #else
1937
- return rb_tainted_str_new2(filename);
1955
+ result = rb_str_new2(filename);
1938
1956
  #endif
1957
+ ASSOCIATE_FILESYSTEM_ENCODING(result);
1958
+ return result;
1939
1959
  }
1940
1960
 
1941
1961
  TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
@@ -1984,7 +2004,7 @@ SWIG_ruby_failed(void)
1984
2004
  }
1985
2005
 
1986
2006
 
1987
- /*@SWIG:/usr/local/share/swig/2.0.9/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2007
+ /*@SWIG:/usr/local/share/swig/3.0.7/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1988
2008
  SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
1989
2009
  {
1990
2010
  VALUE obj = args[0];
@@ -2266,7 +2286,31 @@ free_TagLib_Vorbis_Properties(TagLib::Vorbis::Properties *arg1) {
2266
2286
  }
2267
2287
 
2268
2288
  SWIGINTERN VALUE
2269
- _wrap_Properties_length(int argc, VALUE *argv, VALUE self) {
2289
+ _wrap_Properties_length_in_seconds(int argc, VALUE *argv, VALUE self) {
2290
+ TagLib::Vorbis::Properties *arg1 = (TagLib::Vorbis::Properties *) 0 ;
2291
+ void *argp1 = 0 ;
2292
+ int res1 = 0 ;
2293
+ int result;
2294
+ VALUE vresult = Qnil;
2295
+
2296
+ if ((argc < 0) || (argc > 0)) {
2297
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2298
+ }
2299
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Vorbis__Properties, 0 | 0 );
2300
+ if (!SWIG_IsOK(res1)) {
2301
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Vorbis::Properties const *","lengthInSeconds", 1, self ));
2302
+ }
2303
+ arg1 = reinterpret_cast< TagLib::Vorbis::Properties * >(argp1);
2304
+ result = (int)((TagLib::Vorbis::Properties const *)arg1)->lengthInSeconds();
2305
+ vresult = SWIG_From_int(static_cast< int >(result));
2306
+ return vresult;
2307
+ fail:
2308
+ return Qnil;
2309
+ }
2310
+
2311
+
2312
+ SWIGINTERN VALUE
2313
+ _wrap_Properties_length_in_milliseconds(int argc, VALUE *argv, VALUE self) {
2270
2314
  TagLib::Vorbis::Properties *arg1 = (TagLib::Vorbis::Properties *) 0 ;
2271
2315
  void *argp1 = 0 ;
2272
2316
  int res1 = 0 ;
@@ -2278,10 +2322,10 @@ _wrap_Properties_length(int argc, VALUE *argv, VALUE self) {
2278
2322
  }
2279
2323
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Vorbis__Properties, 0 | 0 );
2280
2324
  if (!SWIG_IsOK(res1)) {
2281
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Vorbis::Properties const *","length", 1, self ));
2325
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Vorbis::Properties const *","lengthInMilliseconds", 1, self ));
2282
2326
  }
2283
2327
  arg1 = reinterpret_cast< TagLib::Vorbis::Properties * >(argp1);
2284
- result = (int)((TagLib::Vorbis::Properties const *)arg1)->length();
2328
+ result = (int)((TagLib::Vorbis::Properties const *)arg1)->lengthInMilliseconds();
2285
2329
  vresult = SWIG_From_int(static_cast< int >(result));
2286
2330
  return vresult;
2287
2331
  fail:
@@ -2461,7 +2505,7 @@ static swig_class SwigClassFile;
2461
2505
 
2462
2506
  SWIGINTERN VALUE
2463
2507
  _wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) {
2464
- SwigValueWrapper< TagLib::FileName > arg1 ;
2508
+ TagLib::FileName arg1 ;
2465
2509
  bool arg2 ;
2466
2510
  TagLib::Vorbis::Properties::ReadStyle arg3 ;
2467
2511
  bool val2 ;
@@ -2500,7 +2544,7 @@ fail:
2500
2544
 
2501
2545
  SWIGINTERN VALUE
2502
2546
  _wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) {
2503
- SwigValueWrapper< TagLib::FileName > arg1 ;
2547
+ TagLib::FileName arg1 ;
2504
2548
  bool arg2 ;
2505
2549
  bool val2 ;
2506
2550
  int ecode2 = 0 ;
@@ -2548,7 +2592,7 @@ _wrap_File_allocate(VALUE self) {
2548
2592
 
2549
2593
  SWIGINTERN VALUE
2550
2594
  _wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) {
2551
- SwigValueWrapper< TagLib::FileName > arg1 ;
2595
+ TagLib::FileName arg1 ;
2552
2596
  TagLib::Vorbis::File *result = 0 ;
2553
2597
 
2554
2598
  if ((argc < 1) || (argc > 1)) {
@@ -2743,6 +2787,7 @@ static void *_p_TagLib__Vorbis__FileTo_p_TagLib__File(void *x, int *SWIGUNUSEDPA
2743
2787
  static swig_type_info _swigt__p_MapT_TagLib__String_TagLib__StringList_t = {"_p_MapT_TagLib__String_TagLib__StringList_t", "Map< TagLib::String,TagLib::StringList > *|TagLib::Ogg::FieldListMap *", 0, 0, (void*)0, 0};
2744
2788
  static swig_type_info _swigt__p_TagLib__AudioProperties = {"_p_TagLib__AudioProperties", "TagLib::AudioProperties *|TagLib::Ogg::Vorbis::AudioProperties *", 0, 0, (void*)0, 0};
2745
2789
  static swig_type_info _swigt__p_TagLib__File = {"_p_TagLib__File", "TagLib::File *", 0, 0, (void*)0, 0};
2790
+ static swig_type_info _swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t = {"_p_TagLib__ListT_TagLib__FLAC__Picture_t", "TagLib::List< TagLib::FLAC::Picture > *|TagLib::FLAC::PictureList *", 0, 0, (void*)0, 0};
2746
2791
  static swig_type_info _swigt__p_TagLib__Ogg__File = {"_p_TagLib__Ogg__File", "TagLib::Ogg::File *", 0, 0, (void*)0, 0};
2747
2792
  static swig_type_info _swigt__p_TagLib__Ogg__XiphComment = {"_p_TagLib__Ogg__XiphComment", "TagLib::Ogg::XiphComment *", 0, 0, (void*)0, 0};
2748
2793
  static swig_type_info _swigt__p_TagLib__Vorbis__File = {"_p_TagLib__Vorbis__File", "TagLib::Vorbis::File *|TagLib::Ogg::Vorbis::File *", 0, 0, (void*)0, 0};
@@ -2757,6 +2802,7 @@ static swig_type_info *swig_type_initial[] = {
2757
2802
  &_swigt__p_MapT_TagLib__String_TagLib__StringList_t,
2758
2803
  &_swigt__p_TagLib__AudioProperties,
2759
2804
  &_swigt__p_TagLib__File,
2805
+ &_swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t,
2760
2806
  &_swigt__p_TagLib__Ogg__File,
2761
2807
  &_swigt__p_TagLib__Ogg__XiphComment,
2762
2808
  &_swigt__p_TagLib__Vorbis__File,
@@ -2771,6 +2817,7 @@ static swig_type_info *swig_type_initial[] = {
2771
2817
  static swig_cast_info _swigc__p_MapT_TagLib__String_TagLib__StringList_t[] = { {&_swigt__p_MapT_TagLib__String_TagLib__StringList_t, 0, 0, 0},{0, 0, 0, 0}};
2772
2818
  static swig_cast_info _swigc__p_TagLib__AudioProperties[] = { {&_swigt__p_TagLib__AudioProperties, 0, 0, 0}, {&_swigt__p_TagLib__Vorbis__Properties, _p_TagLib__Vorbis__PropertiesTo_p_TagLib__AudioProperties, 0, 0},{0, 0, 0, 0}};
2773
2819
  static swig_cast_info _swigc__p_TagLib__File[] = { {&_swigt__p_TagLib__Ogg__File, _p_TagLib__Ogg__FileTo_p_TagLib__File, 0, 0}, {&_swigt__p_TagLib__Vorbis__File, _p_TagLib__Vorbis__FileTo_p_TagLib__File, 0, 0}, {&_swigt__p_TagLib__File, 0, 0, 0},{0, 0, 0, 0}};
2820
+ static swig_cast_info _swigc__p_TagLib__ListT_TagLib__FLAC__Picture_t[] = { {&_swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t, 0, 0, 0},{0, 0, 0, 0}};
2774
2821
  static swig_cast_info _swigc__p_TagLib__Ogg__File[] = { {&_swigt__p_TagLib__Ogg__File, 0, 0, 0}, {&_swigt__p_TagLib__Vorbis__File, _p_TagLib__Vorbis__FileTo_p_TagLib__Ogg__File, 0, 0},{0, 0, 0, 0}};
2775
2822
  static swig_cast_info _swigc__p_TagLib__Ogg__XiphComment[] = { {&_swigt__p_TagLib__Ogg__XiphComment, 0, 0, 0},{0, 0, 0, 0}};
2776
2823
  static swig_cast_info _swigc__p_TagLib__Vorbis__File[] = { {&_swigt__p_TagLib__Vorbis__File, 0, 0, 0},{0, 0, 0, 0}};
@@ -2785,6 +2832,7 @@ static swig_cast_info *swig_cast_initial[] = {
2785
2832
  _swigc__p_MapT_TagLib__String_TagLib__StringList_t,
2786
2833
  _swigc__p_TagLib__AudioProperties,
2787
2834
  _swigc__p_TagLib__File,
2835
+ _swigc__p_TagLib__ListT_TagLib__FLAC__Picture_t,
2788
2836
  _swigc__p_TagLib__Ogg__File,
2789
2837
  _swigc__p_TagLib__Ogg__XiphComment,
2790
2838
  _swigc__p_TagLib__Vorbis__File,
@@ -2801,18 +2849,18 @@ static swig_cast_info *swig_cast_initial[] = {
2801
2849
 
2802
2850
  /* -----------------------------------------------------------------------------
2803
2851
  * Type initialization:
2804
- * This problem is tough by the requirement that no dynamic
2805
- * memory is used. Also, since swig_type_info structures store pointers to
2852
+ * This problem is tough by the requirement that no dynamic
2853
+ * memory is used. Also, since swig_type_info structures store pointers to
2806
2854
  * swig_cast_info structures and swig_cast_info structures store pointers back
2807
- * to swig_type_info structures, we need some lookup code at initialization.
2808
- * The idea is that swig generates all the structures that are needed.
2809
- * The runtime then collects these partially filled structures.
2810
- * The SWIG_InitializeModule function takes these initial arrays out of
2855
+ * to swig_type_info structures, we need some lookup code at initialization.
2856
+ * The idea is that swig generates all the structures that are needed.
2857
+ * The runtime then collects these partially filled structures.
2858
+ * The SWIG_InitializeModule function takes these initial arrays out of
2811
2859
  * swig_module, and does all the lookup, filling in the swig_module.types
2812
2860
  * array with the correct data and linking the correct swig_cast_info
2813
2861
  * structures together.
2814
2862
  *
2815
- * The generated swig_type_info structures are assigned staticly to an initial
2863
+ * The generated swig_type_info structures are assigned statically to an initial
2816
2864
  * array. We just loop through that array, and handle each type individually.
2817
2865
  * First we lookup if this type has been already loaded, and if so, use the
2818
2866
  * loaded structure instead of the generated one. Then we have to fill in the
@@ -2822,17 +2870,17 @@ static swig_cast_info *swig_cast_initial[] = {
2822
2870
  * a column is one of the swig_cast_info structures for that type.
2823
2871
  * The cast_initial array is actually an array of arrays, because each row has
2824
2872
  * a variable number of columns. So to actually build the cast linked list,
2825
- * we find the array of casts associated with the type, and loop through it
2873
+ * we find the array of casts associated with the type, and loop through it
2826
2874
  * adding the casts to the list. The one last trick we need to do is making
2827
2875
  * sure the type pointer in the swig_cast_info struct is correct.
2828
2876
  *
2829
- * First off, we lookup the cast->type name to see if it is already loaded.
2877
+ * First off, we lookup the cast->type name to see if it is already loaded.
2830
2878
  * There are three cases to handle:
2831
2879
  * 1) If the cast->type has already been loaded AND the type we are adding
2832
2880
  * casting info to has not been loaded (it is in this module), THEN we
2833
2881
  * replace the cast->type pointer with the type pointer that has already
2834
2882
  * been loaded.
2835
- * 2) If BOTH types (the one we are adding casting info to, and the
2883
+ * 2) If BOTH types (the one we are adding casting info to, and the
2836
2884
  * cast->type) are loaded, THEN the cast info has already been loaded by
2837
2885
  * the previous module so we just ignore it.
2838
2886
  * 3) Finally, if cast->type has not already been loaded, then we add that
@@ -2856,7 +2904,7 @@ SWIGRUNTIME void
2856
2904
  SWIG_InitializeModule(void *clientdata) {
2857
2905
  size_t i;
2858
2906
  swig_module_info *module_head, *iter;
2859
- int found, init;
2907
+ int init;
2860
2908
 
2861
2909
  /* check to see if the circular list has been setup, if not, set it up */
2862
2910
  if (swig_module.next==0) {
@@ -2875,27 +2923,23 @@ SWIG_InitializeModule(void *clientdata) {
2875
2923
  /* This is the first module loaded for this interpreter */
2876
2924
  /* so set the swig module into the interpreter */
2877
2925
  SWIG_SetModule(clientdata, &swig_module);
2878
- module_head = &swig_module;
2879
2926
  } else {
2880
2927
  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
2881
- found=0;
2882
2928
  iter=module_head;
2883
2929
  do {
2884
2930
  if (iter==&swig_module) {
2885
- found=1;
2886
- break;
2931
+ /* Our module is already in the list, so there's nothing more to do. */
2932
+ return;
2887
2933
  }
2888
2934
  iter=iter->next;
2889
2935
  } while (iter!= module_head);
2890
2936
 
2891
- /* if the is found in the list, then all is done and we may leave */
2892
- if (found) return;
2893
- /* otherwise we must add out module into the list */
2937
+ /* otherwise we must add our module into the list */
2894
2938
  swig_module.next = module_head->next;
2895
2939
  module_head->next = &swig_module;
2896
2940
  }
2897
2941
 
2898
- /* When multiple interpeters are used, a module could have already been initialized in
2942
+ /* When multiple interpreters are used, a module could have already been initialized in
2899
2943
  a different interpreter, but not yet have a pointer in this interpreter.
2900
2944
  In this case, we do not want to continue adding types... everything should be
2901
2945
  set up already */
@@ -2909,7 +2953,7 @@ SWIG_InitializeModule(void *clientdata) {
2909
2953
  swig_type_info *type = 0;
2910
2954
  swig_type_info *ret;
2911
2955
  swig_cast_info *cast;
2912
-
2956
+
2913
2957
  #ifdef SWIGRUNTIME_DEBUG
2914
2958
  printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
2915
2959
  #endif
@@ -2936,7 +2980,7 @@ SWIG_InitializeModule(void *clientdata) {
2936
2980
  /* Insert casting types */
2937
2981
  cast = swig_module.cast_initial[i];
2938
2982
  while (cast->type) {
2939
-
2983
+
2940
2984
  /* Don't need to add information already in the list */
2941
2985
  ret = 0;
2942
2986
  #ifdef SWIGRUNTIME_DEBUG
@@ -3056,12 +3100,14 @@ SWIGEXPORT void Init_taglib_vorbis(void) {
3056
3100
  SWIG_RubyInitializeTrackings();
3057
3101
  rb_require("taglib_ogg");
3058
3102
  rb_require("taglib_base");
3103
+ rb_require("taglib_flac_picture");
3059
3104
 
3060
3105
  SwigClassProperties.klass = rb_define_class_under(mVorbis, "Properties", ((swig_class *) SWIGTYPE_p_TagLib__AudioProperties->clientdata)->klass);
3061
3106
  SWIG_TypeClientData(SWIGTYPE_p_TagLib__Vorbis__Properties, (void *) &SwigClassProperties);
3062
3107
  rb_define_alloc_func(SwigClassProperties.klass, _wrap_Properties_allocate);
3063
3108
  rb_define_method(SwigClassProperties.klass, "initialize", VALUEFUNC(_wrap_new_Properties), -1);
3064
- rb_define_method(SwigClassProperties.klass, "length", VALUEFUNC(_wrap_Properties_length), -1);
3109
+ rb_define_method(SwigClassProperties.klass, "length_in_seconds", VALUEFUNC(_wrap_Properties_length_in_seconds), -1);
3110
+ rb_define_method(SwigClassProperties.klass, "length_in_milliseconds", VALUEFUNC(_wrap_Properties_length_in_milliseconds), -1);
3065
3111
  rb_define_method(SwigClassProperties.klass, "bitrate", VALUEFUNC(_wrap_Properties_bitrate), -1);
3066
3112
  rb_define_method(SwigClassProperties.klass, "sample_rate", VALUEFUNC(_wrap_Properties_sample_rate), -1);
3067
3113
  rb_define_method(SwigClassProperties.klass, "channels", VALUEFUNC(_wrap_Properties_channels), -1);