taglib-ruby 1.1.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +15 -11
- data/docs/taglib/mpeg.rb +1 -9
- data/ext/extconf_common.rb +21 -12
- data/ext/taglib_aiff/taglib_aiff.i +4 -0
- data/ext/taglib_aiff/taglib_aiff_wrap.cxx +222 -59
- data/ext/taglib_base/includes.i +14 -14
- data/ext/taglib_base/taglib_base.i +21 -0
- data/ext/taglib_base/taglib_base_wrap.cxx +289 -350
- data/ext/taglib_flac/taglib_flac.i +7 -3
- data/ext/taglib_flac/taglib_flac_wrap.cxx +233 -336
- data/ext/taglib_flac_picture/taglib_flac_picture.i +4 -0
- data/ext/taglib_flac_picture/taglib_flac_picture_wrap.cxx +125 -71
- data/ext/taglib_id3v1/taglib_id3v1_wrap.cxx +92 -51
- data/ext/taglib_id3v2/taglib_id3v2.i +5 -0
- data/ext/taglib_id3v2/taglib_id3v2_wrap.cxx +524 -414
- data/ext/taglib_mp4/taglib_mp4.i +21 -18
- data/ext/taglib_mp4/taglib_mp4_wrap.cxx +2062 -1467
- data/ext/taglib_mpeg/taglib_mpeg.i +5 -0
- data/ext/taglib_mpeg/taglib_mpeg_wrap.cxx +414 -300
- data/ext/taglib_ogg/taglib_ogg.i +0 -2
- data/ext/taglib_ogg/taglib_ogg_wrap.cxx +44 -42
- data/ext/taglib_vorbis/taglib_vorbis_wrap.cxx +27 -48
- data/ext/taglib_wav/taglib_wav.i +5 -2
- data/ext/taglib_wav/taglib_wav_wrap.cxx +179 -89
- data/lib/taglib/version.rb +3 -3
- data/tasks/ext.rake +23 -39
- data/tasks/swig.rake +14 -4
- data/test/id3v2_write_test.rb +1 -1
- data/test/wav_examples_test.rb +1 -1
- data/test/wav_file_test.rb +1 -1
- data/test/wav_file_write_test.rb +6 -6
- metadata +3 -3
data/ext/taglib_ogg/taglib_ogg.i
CHANGED
@@ -1859,12 +1859,13 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
|
|
1859
1859
|
#define SWIGTYPE_p_TagLib__Ogg__XiphComment swig_types[6]
|
1860
1860
|
#define SWIGTYPE_p_TagLib__Tag swig_types[7]
|
1861
1861
|
#define SWIGTYPE_p_char swig_types[8]
|
1862
|
-
#define
|
1863
|
-
#define
|
1864
|
-
#define
|
1865
|
-
#define
|
1866
|
-
|
1867
|
-
static
|
1862
|
+
#define SWIGTYPE_p_long_long swig_types[9]
|
1863
|
+
#define SWIGTYPE_p_unsigned_char swig_types[10]
|
1864
|
+
#define SWIGTYPE_p_unsigned_int swig_types[11]
|
1865
|
+
#define SWIGTYPE_p_unsigned_long swig_types[12]
|
1866
|
+
#define SWIGTYPE_p_wchar_t swig_types[13]
|
1867
|
+
static swig_type_info *swig_types[15];
|
1868
|
+
static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0};
|
1868
1869
|
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
1869
1870
|
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
1870
1871
|
|
@@ -1938,8 +1939,6 @@ template <typename T> T SwigValueInit() {
|
|
1938
1939
|
#include <taglib/oggfile.h>
|
1939
1940
|
#include <taglib/flacpicture.h>
|
1940
1941
|
#include <taglib/xiphcomment.h>
|
1941
|
-
// Help find FLAC::
|
1942
|
-
using namespace TagLib;
|
1943
1942
|
|
1944
1943
|
|
1945
1944
|
#include <taglib/tstring.h>
|
@@ -1960,34 +1959,26 @@ using namespace TagLib;
|
|
1960
1959
|
#endif
|
1961
1960
|
|
1962
1961
|
VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) {
|
1963
|
-
|
1964
|
-
return Qnil;
|
1965
|
-
} else {
|
1966
|
-
return rb_str_new(byteVector.data(), byteVector.size());
|
1967
|
-
}
|
1962
|
+
return rb_str_new(byteVector.data(), byteVector.size());
|
1968
1963
|
}
|
1969
1964
|
|
1970
1965
|
TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) {
|
1971
1966
|
if (NIL_P(s)) {
|
1972
|
-
return TagLib::ByteVector
|
1967
|
+
return TagLib::ByteVector();
|
1973
1968
|
} else {
|
1974
1969
|
return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s));
|
1975
1970
|
}
|
1976
1971
|
}
|
1977
1972
|
|
1978
1973
|
VALUE taglib_string_to_ruby_string(const TagLib::String & string) {
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
1982
|
-
VALUE result = rb_str_new2(string.toCString(true));
|
1983
|
-
ASSOCIATE_UTF8_ENCODING(result);
|
1984
|
-
return result;
|
1985
|
-
}
|
1974
|
+
VALUE result = rb_str_new2(string.toCString(true));
|
1975
|
+
ASSOCIATE_UTF8_ENCODING(result);
|
1976
|
+
return result;
|
1986
1977
|
}
|
1987
1978
|
|
1988
1979
|
TagLib::String ruby_string_to_taglib_string(VALUE s) {
|
1989
1980
|
if (NIL_P(s)) {
|
1990
|
-
return TagLib::String
|
1981
|
+
return TagLib::String();
|
1991
1982
|
} else {
|
1992
1983
|
return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8);
|
1993
1984
|
}
|
@@ -2076,6 +2067,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
|
|
2076
2067
|
#endif
|
2077
2068
|
}
|
2078
2069
|
|
2070
|
+
VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) {
|
2071
|
+
#ifdef _WIN32
|
2072
|
+
return LL2NUM(off);
|
2073
|
+
#else
|
2074
|
+
return OFFT2NUM(off);
|
2075
|
+
#endif
|
2076
|
+
}
|
2079
2077
|
|
2080
2078
|
|
2081
2079
|
VALUE taglib_flac_picturelist_to_ruby_array(const TagLib::List<TagLib::FLAC::Picture *> & list) {
|
@@ -2106,7 +2104,7 @@ SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2))
|
|
2106
2104
|
}
|
2107
2105
|
|
2108
2106
|
|
2109
|
-
/*@SWIG:/
|
2107
|
+
/*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2110
2108
|
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE arg)
|
2111
2109
|
{
|
2112
2110
|
VALUE *args = (VALUE *)arg;
|
@@ -2226,7 +2224,7 @@ SWIG_From_unsigned_SS_int (unsigned int value)
|
|
2226
2224
|
}
|
2227
2225
|
|
2228
2226
|
|
2229
|
-
/*@SWIG:/
|
2227
|
+
/*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2230
2228
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg)
|
2231
2229
|
{
|
2232
2230
|
VALUE *args = (VALUE *)arg;
|
@@ -3340,20 +3338,28 @@ fail:
|
|
3340
3338
|
SWIGINTERN VALUE
|
3341
3339
|
_wrap_XiphComment_render__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
3342
3340
|
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
3341
|
+
bool arg2 ;
|
3343
3342
|
void *argp1 = 0 ;
|
3344
3343
|
int res1 = 0 ;
|
3344
|
+
bool val2 ;
|
3345
|
+
int ecode2 = 0 ;
|
3345
3346
|
TagLib::ByteVector result;
|
3346
3347
|
VALUE vresult = Qnil;
|
3347
3348
|
|
3348
|
-
if ((argc <
|
3349
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
3349
|
+
if ((argc < 1) || (argc > 1)) {
|
3350
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3350
3351
|
}
|
3351
3352
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Ogg__XiphComment, 0 | 0 );
|
3352
3353
|
if (!SWIG_IsOK(res1)) {
|
3353
3354
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment const *","render", 1, self ));
|
3354
3355
|
}
|
3355
3356
|
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
3356
|
-
|
3357
|
+
ecode2 = SWIG_AsVal_bool(argv[0], &val2);
|
3358
|
+
if (!SWIG_IsOK(ecode2)) {
|
3359
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","render", 2, argv[0] ));
|
3360
|
+
}
|
3361
|
+
arg2 = static_cast< bool >(val2);
|
3362
|
+
result = ((TagLib::Ogg::XiphComment const *)arg1)->render(arg2);
|
3357
3363
|
{
|
3358
3364
|
vresult = taglib_bytevector_to_ruby_string(result);
|
3359
3365
|
}
|
@@ -3366,28 +3372,20 @@ fail:
|
|
3366
3372
|
SWIGINTERN VALUE
|
3367
3373
|
_wrap_XiphComment_render__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
3368
3374
|
TagLib::Ogg::XiphComment *arg1 = (TagLib::Ogg::XiphComment *) 0 ;
|
3369
|
-
bool arg2 ;
|
3370
3375
|
void *argp1 = 0 ;
|
3371
3376
|
int res1 = 0 ;
|
3372
|
-
bool val2 ;
|
3373
|
-
int ecode2 = 0 ;
|
3374
3377
|
TagLib::ByteVector result;
|
3375
3378
|
VALUE vresult = Qnil;
|
3376
3379
|
|
3377
|
-
if ((argc <
|
3378
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
3380
|
+
if ((argc < 0) || (argc > 0)) {
|
3381
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3379
3382
|
}
|
3380
3383
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Ogg__XiphComment, 0 | 0 );
|
3381
3384
|
if (!SWIG_IsOK(res1)) {
|
3382
3385
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Ogg::XiphComment const *","render", 1, self ));
|
3383
3386
|
}
|
3384
3387
|
arg1 = reinterpret_cast< TagLib::Ogg::XiphComment * >(argp1);
|
3385
|
-
|
3386
|
-
if (!SWIG_IsOK(ecode2)) {
|
3387
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","render", 2, argv[0] ));
|
3388
|
-
}
|
3389
|
-
arg2 = static_cast< bool >(val2);
|
3390
|
-
result = ((TagLib::Ogg::XiphComment const *)arg1)->render(arg2);
|
3388
|
+
result = ((TagLib::Ogg::XiphComment const *)arg1)->render();
|
3391
3389
|
{
|
3392
3390
|
vresult = taglib_bytevector_to_ruby_string(result);
|
3393
3391
|
}
|
@@ -3414,7 +3412,7 @@ SWIGINTERN VALUE _wrap_XiphComment_render(int nargs, VALUE *args, VALUE self) {
|
|
3414
3412
|
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__Ogg__XiphComment, 0);
|
3415
3413
|
_v = SWIG_CheckState(res);
|
3416
3414
|
if (_v) {
|
3417
|
-
return
|
3415
|
+
return _wrap_XiphComment_render__SWIG_1(nargs, args, self);
|
3418
3416
|
}
|
3419
3417
|
}
|
3420
3418
|
if (argc == 2) {
|
@@ -3428,15 +3426,15 @@ SWIGINTERN VALUE _wrap_XiphComment_render(int nargs, VALUE *args, VALUE self) {
|
|
3428
3426
|
_v = SWIG_CheckState(res);
|
3429
3427
|
}
|
3430
3428
|
if (_v) {
|
3431
|
-
return
|
3429
|
+
return _wrap_XiphComment_render__SWIG_0(nargs, args, self);
|
3432
3430
|
}
|
3433
3431
|
}
|
3434
3432
|
}
|
3435
3433
|
|
3436
3434
|
fail:
|
3437
3435
|
Ruby_Format_OverloadedError( argc, 3, "XiphComment.render",
|
3438
|
-
" TagLib::ByteVector XiphComment.render()\n"
|
3439
|
-
" TagLib::ByteVector XiphComment.render(
|
3436
|
+
" TagLib::ByteVector XiphComment.render(bool addFramingBit)\n"
|
3437
|
+
" TagLib::ByteVector XiphComment.render()\n");
|
3440
3438
|
|
3441
3439
|
return Qnil;
|
3442
3440
|
}
|
@@ -3657,6 +3655,7 @@ static swig_type_info _swigt__p_TagLib__Ogg__PageHeader = {"_p_TagLib__Ogg__Page
|
|
3657
3655
|
static swig_type_info _swigt__p_TagLib__Ogg__XiphComment = {"_p_TagLib__Ogg__XiphComment", "TagLib::Ogg::XiphComment *", 0, 0, (void*)0, 0};
|
3658
3656
|
static swig_type_info _swigt__p_TagLib__Tag = {"_p_TagLib__Tag", "TagLib::Tag *", 0, 0, (void*)0, 0};
|
3659
3657
|
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
|
3658
|
+
static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0};
|
3660
3659
|
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0};
|
3661
3660
|
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0};
|
3662
3661
|
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0};
|
@@ -3672,6 +3671,7 @@ static swig_type_info *swig_type_initial[] = {
|
|
3672
3671
|
&_swigt__p_TagLib__Ogg__XiphComment,
|
3673
3672
|
&_swigt__p_TagLib__Tag,
|
3674
3673
|
&_swigt__p_char,
|
3674
|
+
&_swigt__p_long_long,
|
3675
3675
|
&_swigt__p_unsigned_char,
|
3676
3676
|
&_swigt__p_unsigned_int,
|
3677
3677
|
&_swigt__p_unsigned_long,
|
@@ -3687,6 +3687,7 @@ static swig_cast_info _swigc__p_TagLib__Ogg__PageHeader[] = { {&_swigt__p_TagLi
|
|
3687
3687
|
static swig_cast_info _swigc__p_TagLib__Ogg__XiphComment[] = { {&_swigt__p_TagLib__Ogg__XiphComment, 0, 0, 0},{0, 0, 0, 0}};
|
3688
3688
|
static swig_cast_info _swigc__p_TagLib__Tag[] = { {&_swigt__p_TagLib__Tag, 0, 0, 0}, {&_swigt__p_TagLib__Ogg__XiphComment, _p_TagLib__Ogg__XiphCommentTo_p_TagLib__Tag, 0, 0},{0, 0, 0, 0}};
|
3689
3689
|
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
|
3690
|
+
static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
|
3690
3691
|
static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
|
3691
3692
|
static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
|
3692
3693
|
static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
|
@@ -3702,6 +3703,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
3702
3703
|
_swigc__p_TagLib__Ogg__XiphComment,
|
3703
3704
|
_swigc__p_TagLib__Tag,
|
3704
3705
|
_swigc__p_char,
|
3706
|
+
_swigc__p_long_long,
|
3705
3707
|
_swigc__p_unsigned_char,
|
3706
3708
|
_swigc__p_unsigned_int,
|
3707
3709
|
_swigc__p_unsigned_long,
|
@@ -1862,12 +1862,13 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
|
|
1862
1862
|
#define SWIGTYPE_p_TagLib__Vorbis__File swig_types[6]
|
1863
1863
|
#define SWIGTYPE_p_TagLib__Vorbis__Properties swig_types[7]
|
1864
1864
|
#define SWIGTYPE_p_char swig_types[8]
|
1865
|
-
#define
|
1866
|
-
#define
|
1867
|
-
#define
|
1868
|
-
#define
|
1869
|
-
|
1870
|
-
static
|
1865
|
+
#define SWIGTYPE_p_long_long swig_types[9]
|
1866
|
+
#define SWIGTYPE_p_unsigned_char swig_types[10]
|
1867
|
+
#define SWIGTYPE_p_unsigned_int swig_types[11]
|
1868
|
+
#define SWIGTYPE_p_unsigned_long swig_types[12]
|
1869
|
+
#define SWIGTYPE_p_wchar_t swig_types[13]
|
1870
|
+
static swig_type_info *swig_types[15];
|
1871
|
+
static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0};
|
1871
1872
|
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
1872
1873
|
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
1873
1874
|
|
@@ -1960,34 +1961,26 @@ template <typename T> T SwigValueInit() {
|
|
1960
1961
|
#endif
|
1961
1962
|
|
1962
1963
|
VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) {
|
1963
|
-
|
1964
|
-
return Qnil;
|
1965
|
-
} else {
|
1966
|
-
return rb_str_new(byteVector.data(), byteVector.size());
|
1967
|
-
}
|
1964
|
+
return rb_str_new(byteVector.data(), byteVector.size());
|
1968
1965
|
}
|
1969
1966
|
|
1970
1967
|
TagLib::ByteVector ruby_string_to_taglib_bytevector(VALUE s) {
|
1971
1968
|
if (NIL_P(s)) {
|
1972
|
-
return TagLib::ByteVector
|
1969
|
+
return TagLib::ByteVector();
|
1973
1970
|
} else {
|
1974
1971
|
return TagLib::ByteVector(RSTRING_PTR(StringValue(s)), RSTRING_LEN(s));
|
1975
1972
|
}
|
1976
1973
|
}
|
1977
1974
|
|
1978
1975
|
VALUE taglib_string_to_ruby_string(const TagLib::String & string) {
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
1982
|
-
VALUE result = rb_str_new2(string.toCString(true));
|
1983
|
-
ASSOCIATE_UTF8_ENCODING(result);
|
1984
|
-
return result;
|
1985
|
-
}
|
1976
|
+
VALUE result = rb_str_new2(string.toCString(true));
|
1977
|
+
ASSOCIATE_UTF8_ENCODING(result);
|
1978
|
+
return result;
|
1986
1979
|
}
|
1987
1980
|
|
1988
1981
|
TagLib::String ruby_string_to_taglib_string(VALUE s) {
|
1989
1982
|
if (NIL_P(s)) {
|
1990
|
-
return TagLib::String
|
1983
|
+
return TagLib::String();
|
1991
1984
|
} else {
|
1992
1985
|
return TagLib::String(RSTRING_PTR(CONVERT_TO_UTF8(StringValue(s))), TagLib::String::UTF8);
|
1993
1986
|
}
|
@@ -2076,6 +2069,13 @@ TagLib::FileName ruby_string_to_taglib_filename(VALUE s) {
|
|
2076
2069
|
#endif
|
2077
2070
|
}
|
2078
2071
|
|
2072
|
+
VALUE taglib_offset_t_to_ruby_int(TagLib::offset_t off) {
|
2073
|
+
#ifdef _WIN32
|
2074
|
+
return LL2NUM(off);
|
2075
|
+
#else
|
2076
|
+
return OFFT2NUM(off);
|
2077
|
+
#endif
|
2078
|
+
}
|
2079
2079
|
|
2080
2080
|
|
2081
2081
|
#include <limits.h>
|
@@ -2095,7 +2095,7 @@ SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2))
|
|
2095
2095
|
}
|
2096
2096
|
|
2097
2097
|
|
2098
|
-
/*@SWIG:/
|
2098
|
+
/*@SWIG:/swig/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2099
2099
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg)
|
2100
2100
|
{
|
2101
2101
|
VALUE *args = (VALUE *)arg;
|
@@ -2376,30 +2376,6 @@ free_TagLib_Vorbis_Properties(void *self) {
|
|
2376
2376
|
delete arg1;
|
2377
2377
|
}
|
2378
2378
|
|
2379
|
-
SWIGINTERN VALUE
|
2380
|
-
_wrap_Properties_length_in_seconds(int argc, VALUE *argv, VALUE self) {
|
2381
|
-
TagLib::Vorbis::Properties *arg1 = (TagLib::Vorbis::Properties *) 0 ;
|
2382
|
-
void *argp1 = 0 ;
|
2383
|
-
int res1 = 0 ;
|
2384
|
-
int result;
|
2385
|
-
VALUE vresult = Qnil;
|
2386
|
-
|
2387
|
-
if ((argc < 0) || (argc > 0)) {
|
2388
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2389
|
-
}
|
2390
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Vorbis__Properties, 0 | 0 );
|
2391
|
-
if (!SWIG_IsOK(res1)) {
|
2392
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Vorbis::Properties const *","lengthInSeconds", 1, self ));
|
2393
|
-
}
|
2394
|
-
arg1 = reinterpret_cast< TagLib::Vorbis::Properties * >(argp1);
|
2395
|
-
result = (int)((TagLib::Vorbis::Properties const *)arg1)->lengthInSeconds();
|
2396
|
-
vresult = SWIG_From_int(static_cast< int >(result));
|
2397
|
-
return vresult;
|
2398
|
-
fail:
|
2399
|
-
return Qnil;
|
2400
|
-
}
|
2401
|
-
|
2402
|
-
|
2403
2379
|
SWIGINTERN VALUE
|
2404
2380
|
_wrap_Properties_length_in_milliseconds(int argc, VALUE *argv, VALUE self) {
|
2405
2381
|
TagLib::Vorbis::Properties *arg1 = (TagLib::Vorbis::Properties *) 0 ;
|
@@ -2874,14 +2850,15 @@ static void *_p_TagLib__Vorbis__FileTo_p_TagLib__Ogg__File(void *x, int *SWIGUNU
|
|
2874
2850
|
return (void *)((TagLib::Ogg::File *) ((TagLib::Vorbis::File *) x));
|
2875
2851
|
}
|
2876
2852
|
static swig_type_info _swigt__p_MapT_TagLib__String_TagLib__StringList_t = {"_p_MapT_TagLib__String_TagLib__StringList_t", "TagLib::Ogg::FieldListMap *|Map< TagLib::String,TagLib::StringList > *", 0, 0, (void*)0, 0};
|
2877
|
-
static swig_type_info _swigt__p_TagLib__AudioProperties = {"_p_TagLib__AudioProperties", "TagLib::
|
2853
|
+
static swig_type_info _swigt__p_TagLib__AudioProperties = {"_p_TagLib__AudioProperties", "TagLib::AudioProperties *", 0, 0, (void*)0, 0};
|
2878
2854
|
static swig_type_info _swigt__p_TagLib__File = {"_p_TagLib__File", "TagLib::File *", 0, 0, (void*)0, 0};
|
2879
2855
|
static swig_type_info _swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t = {"_p_TagLib__ListT_TagLib__FLAC__Picture_t", "TagLib::FLAC::PictureList *|TagLib::List< TagLib::FLAC::Picture > *", 0, 0, (void*)0, 0};
|
2880
2856
|
static swig_type_info _swigt__p_TagLib__Ogg__File = {"_p_TagLib__Ogg__File", "TagLib::Ogg::File *", 0, 0, (void*)0, 0};
|
2881
2857
|
static swig_type_info _swigt__p_TagLib__Ogg__XiphComment = {"_p_TagLib__Ogg__XiphComment", "TagLib::Ogg::XiphComment *", 0, 0, (void*)0, 0};
|
2882
2858
|
static swig_type_info _swigt__p_TagLib__Vorbis__File = {"_p_TagLib__Vorbis__File", "TagLib::Ogg::Vorbis::File *|TagLib::Vorbis::File *", 0, 0, (void*)0, 0};
|
2883
|
-
static swig_type_info _swigt__p_TagLib__Vorbis__Properties = {"_p_TagLib__Vorbis__Properties", "TagLib::Vorbis::Properties *", 0, 0, (void*)0, 0};
|
2859
|
+
static swig_type_info _swigt__p_TagLib__Vorbis__Properties = {"_p_TagLib__Vorbis__Properties", "TagLib::Ogg::Vorbis::Properties *|TagLib::Vorbis::Properties *", 0, 0, (void*)0, 0};
|
2884
2860
|
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
|
2861
|
+
static swig_type_info _swigt__p_long_long = {"_p_long_long", "TagLib::offset_t *|long long *", 0, 0, (void*)0, 0};
|
2885
2862
|
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "TagLib::uchar *|unsigned char *", 0, 0, (void*)0, 0};
|
2886
2863
|
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "TagLib::uint *|unsigned int *", 0, 0, (void*)0, 0};
|
2887
2864
|
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "TagLib::ulong *|unsigned long *", 0, 0, (void*)0, 0};
|
@@ -2897,6 +2874,7 @@ static swig_type_info *swig_type_initial[] = {
|
|
2897
2874
|
&_swigt__p_TagLib__Vorbis__File,
|
2898
2875
|
&_swigt__p_TagLib__Vorbis__Properties,
|
2899
2876
|
&_swigt__p_char,
|
2877
|
+
&_swigt__p_long_long,
|
2900
2878
|
&_swigt__p_unsigned_char,
|
2901
2879
|
&_swigt__p_unsigned_int,
|
2902
2880
|
&_swigt__p_unsigned_long,
|
@@ -2912,6 +2890,7 @@ static swig_cast_info _swigc__p_TagLib__Ogg__XiphComment[] = { {&_swigt__p_TagL
|
|
2912
2890
|
static swig_cast_info _swigc__p_TagLib__Vorbis__File[] = { {&_swigt__p_TagLib__Vorbis__File, 0, 0, 0},{0, 0, 0, 0}};
|
2913
2891
|
static swig_cast_info _swigc__p_TagLib__Vorbis__Properties[] = { {&_swigt__p_TagLib__Vorbis__Properties, 0, 0, 0},{0, 0, 0, 0}};
|
2914
2892
|
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
|
2893
|
+
static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
|
2915
2894
|
static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
|
2916
2895
|
static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
|
2917
2896
|
static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
|
@@ -2927,6 +2906,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
2927
2906
|
_swigc__p_TagLib__Vorbis__File,
|
2928
2907
|
_swigc__p_TagLib__Vorbis__Properties,
|
2929
2908
|
_swigc__p_char,
|
2909
|
+
_swigc__p_long_long,
|
2930
2910
|
_swigc__p_unsigned_char,
|
2931
2911
|
_swigc__p_unsigned_int,
|
2932
2912
|
_swigc__p_unsigned_long,
|
@@ -3198,7 +3178,6 @@ SWIGEXPORT void Init_taglib_vorbis(void) {
|
|
3198
3178
|
SWIG_TypeClientData(SWIGTYPE_p_TagLib__Vorbis__Properties, (void *) &SwigClassProperties);
|
3199
3179
|
rb_define_alloc_func(SwigClassProperties.klass, _wrap_Properties_allocate);
|
3200
3180
|
rb_define_method(SwigClassProperties.klass, "initialize", VALUEFUNC(_wrap_new_Properties), -1);
|
3201
|
-
rb_define_method(SwigClassProperties.klass, "length_in_seconds", VALUEFUNC(_wrap_Properties_length_in_seconds), -1);
|
3202
3181
|
rb_define_method(SwigClassProperties.klass, "length_in_milliseconds", VALUEFUNC(_wrap_Properties_length_in_milliseconds), -1);
|
3203
3182
|
rb_define_method(SwigClassProperties.klass, "bitrate", VALUEFUNC(_wrap_Properties_bitrate), -1);
|
3204
3183
|
rb_define_method(SwigClassProperties.klass, "sample_rate", VALUEFUNC(_wrap_Properties_sample_rate), -1);
|
data/ext/taglib_wav/taglib_wav.i
CHANGED
@@ -4,7 +4,6 @@
|
|
4
4
|
#include <taglib/wavfile.h>
|
5
5
|
#include <taglib/wavproperties.h>
|
6
6
|
#include <taglib/id3v2tag.h>
|
7
|
-
using namespace TagLib::RIFF;
|
8
7
|
%}
|
9
8
|
|
10
9
|
%include "../taglib_base/includes.i"
|
@@ -16,6 +15,9 @@ using namespace TagLib::RIFF;
|
|
16
15
|
%ignore TagLib::RIFF::WAV::Properties::length;
|
17
16
|
%ignore TagLib::RIFF::WAV::Properties::sampleWidth;
|
18
17
|
|
18
|
+
%ignore TagLib::RIFF::File;
|
19
|
+
%include <taglib/rifffile.h>
|
20
|
+
|
19
21
|
%include <taglib/wavproperties.h>
|
20
22
|
|
21
23
|
%freefunc TagLib::RIFF::WAV::File "free_taglib_riff_wav_file";
|
@@ -28,6 +30,7 @@ namespace TagLib {
|
|
28
30
|
|
29
31
|
// Ignore IOStream and all the constructors using it.
|
30
32
|
%ignore IOStream;
|
33
|
+
%ignore TagLib::RIFF::WAV::File::File(IOStream *, bool, Properties::ReadStyle, ID3v2::FrameFactory *f);
|
31
34
|
%ignore TagLib::RIFF::WAV::File::File(IOStream *, bool, Properties::ReadStyle);
|
32
35
|
%ignore TagLib::RIFF::WAV::File::File(IOStream *, bool);
|
33
36
|
%ignore TagLib::RIFF::WAV::File::File(IOStream *);
|
@@ -55,7 +58,7 @@ namespace TagLib {
|
|
55
58
|
static void free_taglib_riff_wav_file(void *ptr) {
|
56
59
|
TagLib::RIFF::WAV::File *file = (TagLib::RIFF::WAV::File *) ptr;
|
57
60
|
|
58
|
-
TagLib::ID3v2::Tag *id3v2tag = file->
|
61
|
+
TagLib::ID3v2::Tag *id3v2tag = file->ID3v2Tag();
|
59
62
|
if (id3v2tag) {
|
60
63
|
TagLib::ID3v2::FrameList frames = id3v2tag->frameList();
|
61
64
|
for (TagLib::ID3v2::FrameList::ConstIterator it = frames.begin(); it != frames.end(); it++) {
|