taglib-ruby 0.7.1 → 1.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 +5 -5
- data/CHANGES.md +7 -0
- data/README.md +25 -10
- data/Rakefile +11 -1
- data/docs/taglib/aiff.rb +35 -3
- data/docs/taglib/base.rb +8 -1
- data/docs/taglib/flac.rb +60 -4
- data/docs/taglib/id3v1.rb +29 -0
- data/docs/taglib/id3v2.rb +1 -1
- data/docs/taglib/mp4.rb +124 -13
- data/docs/taglib/mpeg.rb +30 -1
- data/docs/taglib/ogg.rb +47 -5
- data/docs/taglib/vorbis.rb +1 -1
- data/docs/taglib/wav.rb +56 -3
- data/ext/extconf_common.rb +9 -2
- data/ext/taglib_aiff/taglib_aiff.i +16 -0
- data/ext/taglib_aiff/taglib_aiff_wrap.cxx +228 -58
- data/ext/taglib_base/includes.i +4 -4
- data/ext/taglib_base/taglib_base.i +24 -2
- data/ext/taglib_base/taglib_base_wrap.cxx +76 -51
- data/ext/taglib_flac/taglib_flac.i +14 -18
- data/ext/taglib_flac/taglib_flac_wrap.cxx +341 -799
- data/ext/taglib_flac_picture/extconf.rb +4 -0
- data/ext/taglib_flac_picture/includes.i +15 -0
- data/ext/taglib_flac_picture/taglib_flac_picture.i +15 -0
- data/ext/taglib_flac_picture/taglib_flac_picture_wrap.cxx +3087 -0
- data/ext/taglib_id3v1/taglib_id3v1.i +19 -0
- data/ext/taglib_id3v1/taglib_id3v1_wrap.cxx +241 -58
- data/ext/taglib_id3v2/taglib_id3v2.i +52 -1
- data/ext/taglib_id3v2/taglib_id3v2_wrap.cxx +152 -155
- data/ext/taglib_mp4/taglib_mp4.i +100 -19
- data/ext/taglib_mp4/taglib_mp4_wrap.cxx +939 -148
- data/ext/taglib_mpeg/taglib_mpeg.i +11 -16
- data/ext/taglib_mpeg/taglib_mpeg_wrap.cxx +522 -208
- data/ext/taglib_ogg/taglib_ogg.i +11 -0
- data/ext/taglib_ogg/taglib_ogg_wrap.cxx +328 -57
- data/ext/taglib_vorbis/taglib_vorbis.i +8 -0
- data/ext/taglib_vorbis/taglib_vorbis_wrap.cxx +53 -22
- data/ext/taglib_wav/taglib_wav.i +24 -0
- data/ext/taglib_wav/taglib_wav_wrap.cxx +543 -198
- data/lib/taglib/mp4.rb +2 -1
- data/lib/taglib/version.rb +3 -3
- data/lib/taglib/wav.rb +4 -0
- data/taglib-ruby.gemspec +15 -9
- data/tasks/ext.rake +36 -15
- data/tasks/swig.rake +26 -2
- data/test/aiff_examples_test.rb +1 -1
- data/test/aiff_file_test.rb +12 -3
- data/test/data/vorbis-create.cpp +20 -1
- data/test/data/vorbis.oga +0 -0
- data/test/fileref_properties_test.rb +1 -1
- data/test/flac_file_test.rb +45 -30
- data/test/id3v1_genres_test.rb +23 -0
- data/test/id3v1_tag_test.rb +1 -0
- data/test/id3v2_tag_test.rb +6 -6
- data/test/id3v2_write_test.rb +10 -13
- data/test/mp4_file_test.rb +33 -4
- data/test/mp4_file_write_test.rb +5 -5
- data/test/mp4_items_test.rb +83 -29
- data/test/mpeg_file_test.rb +120 -7
- data/test/vorbis_file_test.rb +2 -2
- data/test/vorbis_tag_test.rb +61 -7
- data/test/wav_examples_test.rb +1 -1
- data/test/wav_file_test.rb +53 -41
- data/test/wav_file_write_test.rb +25 -0
- metadata +19 -9
@@ -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 %{
|
@@ -1833,17 +1833,18 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
|
|
1833
1833
|
#define SWIGTYPE_p_MapT_TagLib__String_TagLib__StringList_t swig_types[0]
|
1834
1834
|
#define SWIGTYPE_p_TagLib__AudioProperties swig_types[1]
|
1835
1835
|
#define SWIGTYPE_p_TagLib__File swig_types[2]
|
1836
|
-
#define
|
1837
|
-
#define
|
1838
|
-
#define
|
1839
|
-
#define
|
1840
|
-
#define
|
1841
|
-
#define
|
1842
|
-
#define
|
1843
|
-
#define
|
1844
|
-
#define
|
1845
|
-
|
1846
|
-
static
|
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};
|
1847
1848
|
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
1848
1849
|
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
1849
1850
|
|
@@ -1893,7 +1894,7 @@ VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) {
|
|
1893
1894
|
if (byteVector.isNull()) {
|
1894
1895
|
return Qnil;
|
1895
1896
|
} else {
|
1896
|
-
return
|
1897
|
+
return rb_str_new(byteVector.data(), byteVector.size());
|
1897
1898
|
}
|
1898
1899
|
}
|
1899
1900
|
|
@@ -1909,7 +1910,7 @@ VALUE taglib_string_to_ruby_string(const TagLib::String & string) {
|
|
1909
1910
|
if (string.isNull()) {
|
1910
1911
|
return Qnil;
|
1911
1912
|
} else {
|
1912
|
-
VALUE result =
|
1913
|
+
VALUE result = rb_str_new2(string.toCString(true));
|
1913
1914
|
ASSOCIATE_UTF8_ENCODING(result);
|
1914
1915
|
return result;
|
1915
1916
|
}
|
@@ -1949,9 +1950,9 @@ VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
|
|
1949
1950
|
VALUE result;
|
1950
1951
|
#ifdef _WIN32
|
1951
1952
|
const char *s = (const char *) filename;
|
1952
|
-
result =
|
1953
|
+
result = rb_str_new2(s);
|
1953
1954
|
#else
|
1954
|
-
result =
|
1955
|
+
result = rb_str_new2(filename);
|
1955
1956
|
#endif
|
1956
1957
|
ASSOCIATE_FILESYSTEM_ENCODING(result);
|
1957
1958
|
return result;
|
@@ -2285,7 +2286,7 @@ free_TagLib_Vorbis_Properties(TagLib::Vorbis::Properties *arg1) {
|
|
2285
2286
|
}
|
2286
2287
|
|
2287
2288
|
SWIGINTERN VALUE
|
2288
|
-
|
2289
|
+
_wrap_Properties_length_in_seconds(int argc, VALUE *argv, VALUE self) {
|
2289
2290
|
TagLib::Vorbis::Properties *arg1 = (TagLib::Vorbis::Properties *) 0 ;
|
2290
2291
|
void *argp1 = 0 ;
|
2291
2292
|
int res1 = 0 ;
|
@@ -2297,10 +2298,34 @@ _wrap_Properties_length(int argc, VALUE *argv, VALUE self) {
|
|
2297
2298
|
}
|
2298
2299
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Vorbis__Properties, 0 | 0 );
|
2299
2300
|
if (!SWIG_IsOK(res1)) {
|
2300
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Vorbis::Properties const *","
|
2301
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Vorbis::Properties const *","lengthInSeconds", 1, self ));
|
2301
2302
|
}
|
2302
2303
|
arg1 = reinterpret_cast< TagLib::Vorbis::Properties * >(argp1);
|
2303
|
-
result = (int)((TagLib::Vorbis::Properties const *)arg1)->
|
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) {
|
2314
|
+
TagLib::Vorbis::Properties *arg1 = (TagLib::Vorbis::Properties *) 0 ;
|
2315
|
+
void *argp1 = 0 ;
|
2316
|
+
int res1 = 0 ;
|
2317
|
+
int result;
|
2318
|
+
VALUE vresult = Qnil;
|
2319
|
+
|
2320
|
+
if ((argc < 0) || (argc > 0)) {
|
2321
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2322
|
+
}
|
2323
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__Vorbis__Properties, 0 | 0 );
|
2324
|
+
if (!SWIG_IsOK(res1)) {
|
2325
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::Vorbis::Properties const *","lengthInMilliseconds", 1, self ));
|
2326
|
+
}
|
2327
|
+
arg1 = reinterpret_cast< TagLib::Vorbis::Properties * >(argp1);
|
2328
|
+
result = (int)((TagLib::Vorbis::Properties const *)arg1)->lengthInMilliseconds();
|
2304
2329
|
vresult = SWIG_From_int(static_cast< int >(result));
|
2305
2330
|
return vresult;
|
2306
2331
|
fail:
|
@@ -2480,7 +2505,7 @@ static swig_class SwigClassFile;
|
|
2480
2505
|
|
2481
2506
|
SWIGINTERN VALUE
|
2482
2507
|
_wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
2483
|
-
|
2508
|
+
TagLib::FileName arg1 ;
|
2484
2509
|
bool arg2 ;
|
2485
2510
|
TagLib::Vorbis::Properties::ReadStyle arg3 ;
|
2486
2511
|
bool val2 ;
|
@@ -2519,7 +2544,7 @@ fail:
|
|
2519
2544
|
|
2520
2545
|
SWIGINTERN VALUE
|
2521
2546
|
_wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
2522
|
-
|
2547
|
+
TagLib::FileName arg1 ;
|
2523
2548
|
bool arg2 ;
|
2524
2549
|
bool val2 ;
|
2525
2550
|
int ecode2 = 0 ;
|
@@ -2567,7 +2592,7 @@ _wrap_File_allocate(VALUE self) {
|
|
2567
2592
|
|
2568
2593
|
SWIGINTERN VALUE
|
2569
2594
|
_wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) {
|
2570
|
-
|
2595
|
+
TagLib::FileName arg1 ;
|
2571
2596
|
TagLib::Vorbis::File *result = 0 ;
|
2572
2597
|
|
2573
2598
|
if ((argc < 1) || (argc > 1)) {
|
@@ -2762,6 +2787,7 @@ static void *_p_TagLib__Vorbis__FileTo_p_TagLib__File(void *x, int *SWIGUNUSEDPA
|
|
2762
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};
|
2763
2788
|
static swig_type_info _swigt__p_TagLib__AudioProperties = {"_p_TagLib__AudioProperties", "TagLib::AudioProperties *|TagLib::Ogg::Vorbis::AudioProperties *", 0, 0, (void*)0, 0};
|
2764
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};
|
2765
2791
|
static swig_type_info _swigt__p_TagLib__Ogg__File = {"_p_TagLib__Ogg__File", "TagLib::Ogg::File *", 0, 0, (void*)0, 0};
|
2766
2792
|
static swig_type_info _swigt__p_TagLib__Ogg__XiphComment = {"_p_TagLib__Ogg__XiphComment", "TagLib::Ogg::XiphComment *", 0, 0, (void*)0, 0};
|
2767
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};
|
@@ -2776,6 +2802,7 @@ static swig_type_info *swig_type_initial[] = {
|
|
2776
2802
|
&_swigt__p_MapT_TagLib__String_TagLib__StringList_t,
|
2777
2803
|
&_swigt__p_TagLib__AudioProperties,
|
2778
2804
|
&_swigt__p_TagLib__File,
|
2805
|
+
&_swigt__p_TagLib__ListT_TagLib__FLAC__Picture_t,
|
2779
2806
|
&_swigt__p_TagLib__Ogg__File,
|
2780
2807
|
&_swigt__p_TagLib__Ogg__XiphComment,
|
2781
2808
|
&_swigt__p_TagLib__Vorbis__File,
|
@@ -2790,6 +2817,7 @@ static swig_type_info *swig_type_initial[] = {
|
|
2790
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}};
|
2791
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}};
|
2792
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}};
|
2793
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}};
|
2794
2822
|
static swig_cast_info _swigc__p_TagLib__Ogg__XiphComment[] = { {&_swigt__p_TagLib__Ogg__XiphComment, 0, 0, 0},{0, 0, 0, 0}};
|
2795
2823
|
static swig_cast_info _swigc__p_TagLib__Vorbis__File[] = { {&_swigt__p_TagLib__Vorbis__File, 0, 0, 0},{0, 0, 0, 0}};
|
@@ -2804,6 +2832,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
2804
2832
|
_swigc__p_MapT_TagLib__String_TagLib__StringList_t,
|
2805
2833
|
_swigc__p_TagLib__AudioProperties,
|
2806
2834
|
_swigc__p_TagLib__File,
|
2835
|
+
_swigc__p_TagLib__ListT_TagLib__FLAC__Picture_t,
|
2807
2836
|
_swigc__p_TagLib__Ogg__File,
|
2808
2837
|
_swigc__p_TagLib__Ogg__XiphComment,
|
2809
2838
|
_swigc__p_TagLib__Vorbis__File,
|
@@ -3071,12 +3100,14 @@ SWIGEXPORT void Init_taglib_vorbis(void) {
|
|
3071
3100
|
SWIG_RubyInitializeTrackings();
|
3072
3101
|
rb_require("taglib_ogg");
|
3073
3102
|
rb_require("taglib_base");
|
3103
|
+
rb_require("taglib_flac_picture");
|
3074
3104
|
|
3075
3105
|
SwigClassProperties.klass = rb_define_class_under(mVorbis, "Properties", ((swig_class *) SWIGTYPE_p_TagLib__AudioProperties->clientdata)->klass);
|
3076
3106
|
SWIG_TypeClientData(SWIGTYPE_p_TagLib__Vorbis__Properties, (void *) &SwigClassProperties);
|
3077
3107
|
rb_define_alloc_func(SwigClassProperties.klass, _wrap_Properties_allocate);
|
3078
3108
|
rb_define_method(SwigClassProperties.klass, "initialize", VALUEFUNC(_wrap_new_Properties), -1);
|
3079
|
-
rb_define_method(SwigClassProperties.klass, "
|
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);
|
3080
3111
|
rb_define_method(SwigClassProperties.klass, "bitrate", VALUEFUNC(_wrap_Properties_bitrate), -1);
|
3081
3112
|
rb_define_method(SwigClassProperties.klass, "sample_rate", VALUEFUNC(_wrap_Properties_sample_rate), -1);
|
3082
3113
|
rb_define_method(SwigClassProperties.klass, "channels", VALUEFUNC(_wrap_Properties_channels), -1);
|
data/ext/taglib_wav/taglib_wav.i
CHANGED
@@ -4,11 +4,18 @@
|
|
4
4
|
#include <taglib/wavfile.h>
|
5
5
|
#include <taglib/wavproperties.h>
|
6
6
|
#include <taglib/id3v2tag.h>
|
7
|
+
using namespace TagLib::RIFF;
|
7
8
|
%}
|
8
9
|
|
9
10
|
%include "../taglib_base/includes.i"
|
10
11
|
%import(module="taglib_base") "../taglib_base/taglib_base.i"
|
11
12
|
|
13
|
+
// Deprecated
|
14
|
+
%ignore TagLib::RIFF::WAV::Properties::Properties(const ByteVector&, ReadStyle);
|
15
|
+
%ignore TagLib::RIFF::WAV::Properties::Properties(const ByteVector&, unsigned int, ReadStyle);
|
16
|
+
%ignore TagLib::RIFF::WAV::Properties::length;
|
17
|
+
%ignore TagLib::RIFF::WAV::Properties::sampleWidth;
|
18
|
+
|
12
19
|
%include <taglib/wavproperties.h>
|
13
20
|
|
14
21
|
%freefunc TagLib::RIFF::WAV::File "free_taglib_riff_wav_file";
|
@@ -19,6 +26,23 @@ namespace TagLib {
|
|
19
26
|
}
|
20
27
|
}
|
21
28
|
|
29
|
+
// Ignore IOStream and all the constructors using it.
|
30
|
+
%ignore IOStream;
|
31
|
+
%ignore TagLib::RIFF::WAV::File::File(IOStream *, bool, Properties::ReadStyle);
|
32
|
+
%ignore TagLib::RIFF::WAV::File::File(IOStream *, bool);
|
33
|
+
%ignore TagLib::RIFF::WAV::File::File(IOStream *);
|
34
|
+
|
35
|
+
// Ignore the unified property interface.
|
36
|
+
%ignore TagLib::RIFF::WAV::File::properties;
|
37
|
+
%ignore TagLib::RIFF::WAV::File::setProperties;
|
38
|
+
%ignore TagLib::RIFF::WAV::File::removeUnsupportedProperties;
|
39
|
+
|
40
|
+
%ignore TagLib::RIFF::WAV::File::InfoTag;
|
41
|
+
|
42
|
+
%rename(id3v2_tag) TagLib::RIFF::WAV::File::ID3v2Tag;
|
43
|
+
%rename("id3v2_tag?") TagLib::RIFF::WAV::File::hasID3v2Tag;
|
44
|
+
%rename("info_tag?") TagLib::RIFF::WAV::File::hasInfoTag;
|
45
|
+
|
22
46
|
%include <taglib/wavfile.h>
|
23
47
|
|
24
48
|
// Unlink Ruby objects from the deleted C++ objects. Otherwise Ruby code
|
@@ -1870,6 +1870,7 @@ static VALUE mWAV;
|
|
1870
1870
|
#include <taglib/wavfile.h>
|
1871
1871
|
#include <taglib/wavproperties.h>
|
1872
1872
|
#include <taglib/id3v2tag.h>
|
1873
|
+
using namespace TagLib::RIFF;
|
1873
1874
|
|
1874
1875
|
|
1875
1876
|
#include <taglib/tstring.h>
|
@@ -1891,7 +1892,7 @@ VALUE taglib_bytevector_to_ruby_string(const TagLib::ByteVector &byteVector) {
|
|
1891
1892
|
if (byteVector.isNull()) {
|
1892
1893
|
return Qnil;
|
1893
1894
|
} else {
|
1894
|
-
return
|
1895
|
+
return rb_str_new(byteVector.data(), byteVector.size());
|
1895
1896
|
}
|
1896
1897
|
}
|
1897
1898
|
|
@@ -1907,7 +1908,7 @@ VALUE taglib_string_to_ruby_string(const TagLib::String & string) {
|
|
1907
1908
|
if (string.isNull()) {
|
1908
1909
|
return Qnil;
|
1909
1910
|
} else {
|
1910
|
-
VALUE result =
|
1911
|
+
VALUE result = rb_str_new2(string.toCString(true));
|
1911
1912
|
ASSOCIATE_UTF8_ENCODING(result);
|
1912
1913
|
return result;
|
1913
1914
|
}
|
@@ -1947,9 +1948,9 @@ VALUE taglib_filename_to_ruby_string(TagLib::FileName filename) {
|
|
1947
1948
|
VALUE result;
|
1948
1949
|
#ifdef _WIN32
|
1949
1950
|
const char *s = (const char *) filename;
|
1950
|
-
result =
|
1951
|
+
result = rb_str_new2(s);
|
1951
1952
|
#else
|
1952
|
-
result =
|
1953
|
+
result = rb_str_new2(filename);
|
1953
1954
|
#endif
|
1954
1955
|
ASSOCIATE_FILESYSTEM_ENCODING(result);
|
1955
1956
|
return result;
|
@@ -2046,6 +2047,50 @@ SWIG_AsVal_int (VALUE obj, int *val)
|
|
2046
2047
|
}
|
2047
2048
|
|
2048
2049
|
|
2050
|
+
#define SWIG_From_long LONG2NUM
|
2051
|
+
|
2052
|
+
|
2053
|
+
SWIGINTERNINLINE VALUE
|
2054
|
+
SWIG_From_int (int value)
|
2055
|
+
{
|
2056
|
+
return SWIG_From_long (value);
|
2057
|
+
}
|
2058
|
+
|
2059
|
+
|
2060
|
+
SWIGINTERNINLINE VALUE
|
2061
|
+
SWIG_From_unsigned_SS_long (unsigned long value)
|
2062
|
+
{
|
2063
|
+
return ULONG2NUM(value);
|
2064
|
+
}
|
2065
|
+
|
2066
|
+
|
2067
|
+
SWIGINTERNINLINE VALUE
|
2068
|
+
SWIG_From_unsigned_SS_int (unsigned int value)
|
2069
|
+
{
|
2070
|
+
return SWIG_From_unsigned_SS_long (value);
|
2071
|
+
}
|
2072
|
+
|
2073
|
+
|
2074
|
+
SWIGINTERN int
|
2075
|
+
SWIG_AsVal_bool (VALUE obj, bool *val)
|
2076
|
+
{
|
2077
|
+
if (obj == Qtrue) {
|
2078
|
+
if (val) *val = true;
|
2079
|
+
return SWIG_OK;
|
2080
|
+
} else if (obj == Qfalse) {
|
2081
|
+
if (val) *val = false;
|
2082
|
+
return SWIG_OK;
|
2083
|
+
} else {
|
2084
|
+
int res = 0;
|
2085
|
+
if (SWIG_AsVal_int (obj, &res) == SWIG_OK) {
|
2086
|
+
if (val) *val = res ? true : false;
|
2087
|
+
return SWIG_OK;
|
2088
|
+
}
|
2089
|
+
}
|
2090
|
+
return SWIG_TypeError;
|
2091
|
+
}
|
2092
|
+
|
2093
|
+
|
2049
2094
|
SWIGINTERN swig_type_info*
|
2050
2095
|
SWIG_pchar_descriptor(void)
|
2051
2096
|
{
|
@@ -2096,81 +2141,6 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
|
|
2096
2141
|
|
2097
2142
|
|
2098
2143
|
|
2099
|
-
/*@SWIG:/usr/local/share/swig/3.0.7/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2100
|
-
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
|
2101
|
-
{
|
2102
|
-
VALUE obj = args[0];
|
2103
|
-
VALUE type = TYPE(obj);
|
2104
|
-
unsigned long *res = (unsigned long *)(args[1]);
|
2105
|
-
*res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj);
|
2106
|
-
return obj;
|
2107
|
-
}
|
2108
|
-
/*@SWIG@*/
|
2109
|
-
|
2110
|
-
SWIGINTERN int
|
2111
|
-
SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
|
2112
|
-
{
|
2113
|
-
VALUE type = TYPE(obj);
|
2114
|
-
if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
|
2115
|
-
unsigned long v;
|
2116
|
-
VALUE a[2];
|
2117
|
-
a[0] = obj;
|
2118
|
-
a[1] = (VALUE)(&v);
|
2119
|
-
if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
|
2120
|
-
if (val) *val = v;
|
2121
|
-
return SWIG_OK;
|
2122
|
-
}
|
2123
|
-
}
|
2124
|
-
return SWIG_TypeError;
|
2125
|
-
}
|
2126
|
-
|
2127
|
-
|
2128
|
-
SWIGINTERN int
|
2129
|
-
SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val)
|
2130
|
-
{
|
2131
|
-
unsigned long v;
|
2132
|
-
int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
|
2133
|
-
if (SWIG_IsOK(res)) {
|
2134
|
-
if ((v > UINT_MAX)) {
|
2135
|
-
return SWIG_OverflowError;
|
2136
|
-
} else {
|
2137
|
-
if (val) *val = static_cast< unsigned int >(v);
|
2138
|
-
}
|
2139
|
-
}
|
2140
|
-
return res;
|
2141
|
-
}
|
2142
|
-
|
2143
|
-
|
2144
|
-
#define SWIG_From_long LONG2NUM
|
2145
|
-
|
2146
|
-
|
2147
|
-
SWIGINTERNINLINE VALUE
|
2148
|
-
SWIG_From_int (int value)
|
2149
|
-
{
|
2150
|
-
return SWIG_From_long (value);
|
2151
|
-
}
|
2152
|
-
|
2153
|
-
|
2154
|
-
SWIGINTERN int
|
2155
|
-
SWIG_AsVal_bool (VALUE obj, bool *val)
|
2156
|
-
{
|
2157
|
-
if (obj == Qtrue) {
|
2158
|
-
if (val) *val = true;
|
2159
|
-
return SWIG_OK;
|
2160
|
-
} else if (obj == Qfalse) {
|
2161
|
-
if (val) *val = false;
|
2162
|
-
return SWIG_OK;
|
2163
|
-
} else {
|
2164
|
-
int res = 0;
|
2165
|
-
if (SWIG_AsVal_int (obj, &res) == SWIG_OK) {
|
2166
|
-
if (val) *val = res ? true : false;
|
2167
|
-
return SWIG_OK;
|
2168
|
-
}
|
2169
|
-
}
|
2170
|
-
return SWIG_TypeError;
|
2171
|
-
}
|
2172
|
-
|
2173
|
-
|
2174
2144
|
SWIGINTERNINLINE VALUE
|
2175
2145
|
SWIG_From_bool (bool value)
|
2176
2146
|
{
|
@@ -2211,36 +2181,6 @@ SWIGINTERN void TagLib_RIFF_WAV_File_close(TagLib::RIFF::WAV::File *self){
|
|
2211
2181
|
|
2212
2182
|
static swig_class SwigClassProperties;
|
2213
2183
|
|
2214
|
-
SWIGINTERN VALUE
|
2215
|
-
_wrap_new_Properties__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
2216
|
-
TagLib::ByteVector *arg1 = 0 ;
|
2217
|
-
TagLib::AudioProperties::ReadStyle arg2 ;
|
2218
|
-
TagLib::ByteVector tmp1 ;
|
2219
|
-
int val2 ;
|
2220
|
-
int ecode2 = 0 ;
|
2221
|
-
TagLib::RIFF::WAV::Properties *result = 0 ;
|
2222
|
-
|
2223
|
-
if ((argc < 2) || (argc > 2)) {
|
2224
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
2225
|
-
}
|
2226
|
-
{
|
2227
|
-
tmp1 = ruby_string_to_taglib_bytevector(argv[0]);
|
2228
|
-
arg1 = &tmp1;
|
2229
|
-
}
|
2230
|
-
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
2231
|
-
if (!SWIG_IsOK(ecode2)) {
|
2232
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::AudioProperties::ReadStyle","Properties", 2, argv[1] ));
|
2233
|
-
}
|
2234
|
-
arg2 = static_cast< TagLib::AudioProperties::ReadStyle >(val2);
|
2235
|
-
result = (TagLib::RIFF::WAV::Properties *)new TagLib::RIFF::WAV::Properties((TagLib::ByteVector const &)*arg1,arg2);
|
2236
|
-
DATA_PTR(self) = result;
|
2237
|
-
SWIG_RubyAddTracking(result, self);
|
2238
|
-
return self;
|
2239
|
-
fail:
|
2240
|
-
return Qnil;
|
2241
|
-
}
|
2242
|
-
|
2243
|
-
|
2244
2184
|
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
2245
2185
|
SWIGINTERN VALUE
|
2246
2186
|
_wrap_Properties_allocate(VALUE self) {
|
@@ -2259,35 +2199,29 @@ _wrap_Properties_allocate(VALUE self) {
|
|
2259
2199
|
|
2260
2200
|
|
2261
2201
|
SWIGINTERN VALUE
|
2262
|
-
|
2263
|
-
TagLib::
|
2264
|
-
TagLib::
|
2265
|
-
|
2266
|
-
|
2267
|
-
|
2202
|
+
_wrap_new_Properties(int argc, VALUE *argv, VALUE self) {
|
2203
|
+
TagLib::RIFF::WAV::File *arg1 = (TagLib::RIFF::WAV::File *) 0 ;
|
2204
|
+
TagLib::AudioProperties::ReadStyle arg2 ;
|
2205
|
+
void *argp1 = 0 ;
|
2206
|
+
int res1 = 0 ;
|
2207
|
+
int val2 ;
|
2268
2208
|
int ecode2 = 0 ;
|
2269
|
-
int val3 ;
|
2270
|
-
int ecode3 = 0 ;
|
2271
2209
|
TagLib::RIFF::WAV::Properties *result = 0 ;
|
2272
2210
|
|
2273
|
-
if ((argc <
|
2274
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2211
|
+
if ((argc < 2) || (argc > 2)) {
|
2212
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
2275
2213
|
}
|
2276
|
-
|
2277
|
-
|
2278
|
-
|
2214
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__File, 0 | 0 );
|
2215
|
+
if (!SWIG_IsOK(res1)) {
|
2216
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File *","Properties", 1, argv[0] ));
|
2279
2217
|
}
|
2280
|
-
|
2218
|
+
arg1 = reinterpret_cast< TagLib::RIFF::WAV::File * >(argp1);
|
2219
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
2281
2220
|
if (!SWIG_IsOK(ecode2)) {
|
2282
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::
|
2283
|
-
}
|
2284
|
-
arg2 = static_cast< TagLib::uint >(val2);
|
2285
|
-
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
2286
|
-
if (!SWIG_IsOK(ecode3)) {
|
2287
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "TagLib::AudioProperties::ReadStyle","Properties", 3, argv[2] ));
|
2221
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::AudioProperties::ReadStyle","Properties", 2, argv[1] ));
|
2288
2222
|
}
|
2289
|
-
|
2290
|
-
result = (TagLib::RIFF::WAV::Properties *)new TagLib::RIFF::WAV::Properties(
|
2223
|
+
arg2 = static_cast< TagLib::AudioProperties::ReadStyle >(val2);
|
2224
|
+
result = (TagLib::RIFF::WAV::Properties *)new TagLib::RIFF::WAV::Properties(arg1,arg2);
|
2291
2225
|
DATA_PTR(self) = result;
|
2292
2226
|
SWIG_RubyAddTracking(result, self);
|
2293
2227
|
return self;
|
@@ -2296,68 +2230,38 @@ fail:
|
|
2296
2230
|
}
|
2297
2231
|
|
2298
2232
|
|
2299
|
-
SWIGINTERN
|
2300
|
-
|
2301
|
-
|
2302
|
-
|
2233
|
+
SWIGINTERN void
|
2234
|
+
free_TagLib_RIFF_WAV_Properties(TagLib::RIFF::WAV::Properties *arg1) {
|
2235
|
+
SWIG_RubyRemoveTracking(arg1);
|
2236
|
+
delete arg1;
|
2237
|
+
}
|
2238
|
+
|
2239
|
+
SWIGINTERN VALUE
|
2240
|
+
_wrap_Properties_length_in_seconds(int argc, VALUE *argv, VALUE self) {
|
2241
|
+
TagLib::RIFF::WAV::Properties *arg1 = (TagLib::RIFF::WAV::Properties *) 0 ;
|
2242
|
+
void *argp1 = 0 ;
|
2243
|
+
int res1 = 0 ;
|
2244
|
+
int result;
|
2245
|
+
VALUE vresult = Qnil;
|
2303
2246
|
|
2304
|
-
argc
|
2305
|
-
|
2306
|
-
for (ii = 0; (ii < argc); ++ii) {
|
2307
|
-
argv[ii] = args[ii];
|
2308
|
-
}
|
2309
|
-
if (argc == 2) {
|
2310
|
-
int _v;
|
2311
|
-
int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
|
2312
|
-
_v = SWIG_CheckState(res);
|
2313
|
-
if (_v) {
|
2314
|
-
{
|
2315
|
-
int res = SWIG_AsVal_int(argv[1], NULL);
|
2316
|
-
_v = SWIG_CheckState(res);
|
2317
|
-
}
|
2318
|
-
if (_v) {
|
2319
|
-
return _wrap_new_Properties__SWIG_0(nargs, args, self);
|
2320
|
-
}
|
2321
|
-
}
|
2247
|
+
if ((argc < 0) || (argc > 0)) {
|
2248
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2322
2249
|
}
|
2323
|
-
|
2324
|
-
|
2325
|
-
|
2326
|
-
_v = SWIG_CheckState(res);
|
2327
|
-
if (_v) {
|
2328
|
-
{
|
2329
|
-
int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
|
2330
|
-
_v = SWIG_CheckState(res);
|
2331
|
-
}
|
2332
|
-
if (_v) {
|
2333
|
-
{
|
2334
|
-
int res = SWIG_AsVal_int(argv[2], NULL);
|
2335
|
-
_v = SWIG_CheckState(res);
|
2336
|
-
}
|
2337
|
-
if (_v) {
|
2338
|
-
return _wrap_new_Properties__SWIG_1(nargs, args, self);
|
2339
|
-
}
|
2340
|
-
}
|
2341
|
-
}
|
2250
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__Properties, 0 | 0 );
|
2251
|
+
if (!SWIG_IsOK(res1)) {
|
2252
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::Properties const *","lengthInSeconds", 1, self ));
|
2342
2253
|
}
|
2343
|
-
|
2254
|
+
arg1 = reinterpret_cast< TagLib::RIFF::WAV::Properties * >(argp1);
|
2255
|
+
result = (int)((TagLib::RIFF::WAV::Properties const *)arg1)->lengthInSeconds();
|
2256
|
+
vresult = SWIG_From_int(static_cast< int >(result));
|
2257
|
+
return vresult;
|
2344
2258
|
fail:
|
2345
|
-
Ruby_Format_OverloadedError( argc, 3, "Properties.new",
|
2346
|
-
" Properties.new(TagLib::ByteVector const &data, TagLib::AudioProperties::ReadStyle style)\n"
|
2347
|
-
" Properties.new(TagLib::ByteVector const &data, TagLib::uint streamLength, TagLib::AudioProperties::ReadStyle style)\n");
|
2348
|
-
|
2349
2259
|
return Qnil;
|
2350
2260
|
}
|
2351
2261
|
|
2352
2262
|
|
2353
|
-
SWIGINTERN void
|
2354
|
-
free_TagLib_RIFF_WAV_Properties(TagLib::RIFF::WAV::Properties *arg1) {
|
2355
|
-
SWIG_RubyRemoveTracking(arg1);
|
2356
|
-
delete arg1;
|
2357
|
-
}
|
2358
|
-
|
2359
2263
|
SWIGINTERN VALUE
|
2360
|
-
|
2264
|
+
_wrap_Properties_length_in_milliseconds(int argc, VALUE *argv, VALUE self) {
|
2361
2265
|
TagLib::RIFF::WAV::Properties *arg1 = (TagLib::RIFF::WAV::Properties *) 0 ;
|
2362
2266
|
void *argp1 = 0 ;
|
2363
2267
|
int res1 = 0 ;
|
@@ -2369,10 +2273,10 @@ _wrap_Properties_length(int argc, VALUE *argv, VALUE self) {
|
|
2369
2273
|
}
|
2370
2274
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__Properties, 0 | 0 );
|
2371
2275
|
if (!SWIG_IsOK(res1)) {
|
2372
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::Properties const *","
|
2276
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::Properties const *","lengthInMilliseconds", 1, self ));
|
2373
2277
|
}
|
2374
2278
|
arg1 = reinterpret_cast< TagLib::RIFF::WAV::Properties * >(argp1);
|
2375
|
-
result = (int)((TagLib::RIFF::WAV::Properties const *)arg1)->
|
2279
|
+
result = (int)((TagLib::RIFF::WAV::Properties const *)arg1)->lengthInMilliseconds();
|
2376
2280
|
vresult = SWIG_From_int(static_cast< int >(result));
|
2377
2281
|
return vresult;
|
2378
2282
|
fail:
|
@@ -2453,7 +2357,55 @@ fail:
|
|
2453
2357
|
|
2454
2358
|
|
2455
2359
|
SWIGINTERN VALUE
|
2456
|
-
|
2360
|
+
_wrap_Properties_bits_per_sample(int argc, VALUE *argv, VALUE self) {
|
2361
|
+
TagLib::RIFF::WAV::Properties *arg1 = (TagLib::RIFF::WAV::Properties *) 0 ;
|
2362
|
+
void *argp1 = 0 ;
|
2363
|
+
int res1 = 0 ;
|
2364
|
+
int result;
|
2365
|
+
VALUE vresult = Qnil;
|
2366
|
+
|
2367
|
+
if ((argc < 0) || (argc > 0)) {
|
2368
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2369
|
+
}
|
2370
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__Properties, 0 | 0 );
|
2371
|
+
if (!SWIG_IsOK(res1)) {
|
2372
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::Properties const *","bitsPerSample", 1, self ));
|
2373
|
+
}
|
2374
|
+
arg1 = reinterpret_cast< TagLib::RIFF::WAV::Properties * >(argp1);
|
2375
|
+
result = (int)((TagLib::RIFF::WAV::Properties const *)arg1)->bitsPerSample();
|
2376
|
+
vresult = SWIG_From_int(static_cast< int >(result));
|
2377
|
+
return vresult;
|
2378
|
+
fail:
|
2379
|
+
return Qnil;
|
2380
|
+
}
|
2381
|
+
|
2382
|
+
|
2383
|
+
SWIGINTERN VALUE
|
2384
|
+
_wrap_Properties_sample_frames(int argc, VALUE *argv, VALUE self) {
|
2385
|
+
TagLib::RIFF::WAV::Properties *arg1 = (TagLib::RIFF::WAV::Properties *) 0 ;
|
2386
|
+
void *argp1 = 0 ;
|
2387
|
+
int res1 = 0 ;
|
2388
|
+
unsigned int result;
|
2389
|
+
VALUE vresult = Qnil;
|
2390
|
+
|
2391
|
+
if ((argc < 0) || (argc > 0)) {
|
2392
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2393
|
+
}
|
2394
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__Properties, 0 | 0 );
|
2395
|
+
if (!SWIG_IsOK(res1)) {
|
2396
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::Properties const *","sampleFrames", 1, self ));
|
2397
|
+
}
|
2398
|
+
arg1 = reinterpret_cast< TagLib::RIFF::WAV::Properties * >(argp1);
|
2399
|
+
result = (unsigned int)((TagLib::RIFF::WAV::Properties const *)arg1)->sampleFrames();
|
2400
|
+
vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
|
2401
|
+
return vresult;
|
2402
|
+
fail:
|
2403
|
+
return Qnil;
|
2404
|
+
}
|
2405
|
+
|
2406
|
+
|
2407
|
+
SWIGINTERN VALUE
|
2408
|
+
_wrap_Properties_format(int argc, VALUE *argv, VALUE self) {
|
2457
2409
|
TagLib::RIFF::WAV::Properties *arg1 = (TagLib::RIFF::WAV::Properties *) 0 ;
|
2458
2410
|
void *argp1 = 0 ;
|
2459
2411
|
int res1 = 0 ;
|
@@ -2465,10 +2417,10 @@ _wrap_Properties_sample_width(int argc, VALUE *argv, VALUE self) {
|
|
2465
2417
|
}
|
2466
2418
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__Properties, 0 | 0 );
|
2467
2419
|
if (!SWIG_IsOK(res1)) {
|
2468
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::Properties const *","
|
2420
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::Properties const *","format", 1, self ));
|
2469
2421
|
}
|
2470
2422
|
arg1 = reinterpret_cast< TagLib::RIFF::WAV::Properties * >(argp1);
|
2471
|
-
result = (int)((TagLib::RIFF::WAV::Properties const *)arg1)->
|
2423
|
+
result = (int)((TagLib::RIFF::WAV::Properties const *)arg1)->format();
|
2472
2424
|
vresult = SWIG_From_int(static_cast< int >(result));
|
2473
2425
|
return vresult;
|
2474
2426
|
fail:
|
@@ -2480,7 +2432,7 @@ static swig_class SwigClassFile;
|
|
2480
2432
|
|
2481
2433
|
SWIGINTERN VALUE
|
2482
2434
|
_wrap_new_File__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
2483
|
-
|
2435
|
+
TagLib::FileName arg1 ;
|
2484
2436
|
bool arg2 ;
|
2485
2437
|
TagLib::RIFF::WAV::Properties::ReadStyle arg3 ;
|
2486
2438
|
bool val2 ;
|
@@ -2519,7 +2471,7 @@ fail:
|
|
2519
2471
|
|
2520
2472
|
SWIGINTERN VALUE
|
2521
2473
|
_wrap_new_File__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
2522
|
-
|
2474
|
+
TagLib::FileName arg1 ;
|
2523
2475
|
bool arg2 ;
|
2524
2476
|
bool val2 ;
|
2525
2477
|
int ecode2 = 0 ;
|
@@ -2567,7 +2519,7 @@ _wrap_File_allocate(VALUE self) {
|
|
2567
2519
|
|
2568
2520
|
SWIGINTERN VALUE
|
2569
2521
|
_wrap_new_File__SWIG_2(int argc, VALUE *argv, VALUE self) {
|
2570
|
-
|
2522
|
+
TagLib::FileName arg1 ;
|
2571
2523
|
TagLib::RIFF::WAV::File *result = 0 ;
|
2572
2524
|
|
2573
2525
|
if ((argc < 1) || (argc > 1)) {
|
@@ -2676,11 +2628,11 @@ fail:
|
|
2676
2628
|
|
2677
2629
|
|
2678
2630
|
SWIGINTERN VALUE
|
2679
|
-
|
2631
|
+
_wrap_File_id3v2_tag(int argc, VALUE *argv, VALUE self) {
|
2680
2632
|
TagLib::RIFF::WAV::File *arg1 = (TagLib::RIFF::WAV::File *) 0 ;
|
2681
2633
|
void *argp1 = 0 ;
|
2682
2634
|
int res1 = 0 ;
|
2683
|
-
TagLib::
|
2635
|
+
TagLib::ID3v2::Tag *result = 0 ;
|
2684
2636
|
VALUE vresult = Qnil;
|
2685
2637
|
|
2686
2638
|
if ((argc < 0) || (argc > 0)) {
|
@@ -2688,7 +2640,126 @@ _wrap_File_audio_properties(int argc, VALUE *argv, VALUE self) {
|
|
2688
2640
|
}
|
2689
2641
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__File, 0 | 0 );
|
2690
2642
|
if (!SWIG_IsOK(res1)) {
|
2691
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File const *","
|
2643
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File const *","ID3v2Tag", 1, self ));
|
2644
|
+
}
|
2645
|
+
arg1 = reinterpret_cast< TagLib::RIFF::WAV::File * >(argp1);
|
2646
|
+
result = (TagLib::ID3v2::Tag *)((TagLib::RIFF::WAV::File const *)arg1)->ID3v2Tag();
|
2647
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TagLib__ID3v2__Tag, 0 | 0 );
|
2648
|
+
return vresult;
|
2649
|
+
fail:
|
2650
|
+
return Qnil;
|
2651
|
+
}
|
2652
|
+
|
2653
|
+
|
2654
|
+
SWIGINTERN VALUE
|
2655
|
+
_wrap_File_strip__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
2656
|
+
TagLib::RIFF::WAV::File *arg1 = (TagLib::RIFF::WAV::File *) 0 ;
|
2657
|
+
TagLib::RIFF::WAV::File::TagTypes arg2 ;
|
2658
|
+
void *argp1 = 0 ;
|
2659
|
+
int res1 = 0 ;
|
2660
|
+
int val2 ;
|
2661
|
+
int ecode2 = 0 ;
|
2662
|
+
|
2663
|
+
if ((argc < 1) || (argc > 1)) {
|
2664
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2665
|
+
}
|
2666
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__File, 0 | 0 );
|
2667
|
+
if (!SWIG_IsOK(res1)) {
|
2668
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File *","strip", 1, self ));
|
2669
|
+
}
|
2670
|
+
arg1 = reinterpret_cast< TagLib::RIFF::WAV::File * >(argp1);
|
2671
|
+
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
2672
|
+
if (!SWIG_IsOK(ecode2)) {
|
2673
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File::TagTypes","strip", 2, argv[0] ));
|
2674
|
+
}
|
2675
|
+
arg2 = static_cast< TagLib::RIFF::WAV::File::TagTypes >(val2);
|
2676
|
+
(arg1)->strip(arg2);
|
2677
|
+
return Qnil;
|
2678
|
+
fail:
|
2679
|
+
return Qnil;
|
2680
|
+
}
|
2681
|
+
|
2682
|
+
|
2683
|
+
SWIGINTERN VALUE
|
2684
|
+
_wrap_File_strip__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
2685
|
+
TagLib::RIFF::WAV::File *arg1 = (TagLib::RIFF::WAV::File *) 0 ;
|
2686
|
+
void *argp1 = 0 ;
|
2687
|
+
int res1 = 0 ;
|
2688
|
+
|
2689
|
+
if ((argc < 0) || (argc > 0)) {
|
2690
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2691
|
+
}
|
2692
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__File, 0 | 0 );
|
2693
|
+
if (!SWIG_IsOK(res1)) {
|
2694
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File *","strip", 1, self ));
|
2695
|
+
}
|
2696
|
+
arg1 = reinterpret_cast< TagLib::RIFF::WAV::File * >(argp1);
|
2697
|
+
(arg1)->strip();
|
2698
|
+
return Qnil;
|
2699
|
+
fail:
|
2700
|
+
return Qnil;
|
2701
|
+
}
|
2702
|
+
|
2703
|
+
|
2704
|
+
SWIGINTERN VALUE _wrap_File_strip(int nargs, VALUE *args, VALUE self) {
|
2705
|
+
int argc;
|
2706
|
+
VALUE argv[3];
|
2707
|
+
int ii;
|
2708
|
+
|
2709
|
+
argc = nargs + 1;
|
2710
|
+
argv[0] = self;
|
2711
|
+
if (argc > 3) SWIG_fail;
|
2712
|
+
for (ii = 1; (ii < argc); ++ii) {
|
2713
|
+
argv[ii] = args[ii-1];
|
2714
|
+
}
|
2715
|
+
if (argc == 1) {
|
2716
|
+
int _v;
|
2717
|
+
void *vptr = 0;
|
2718
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__RIFF__WAV__File, 0);
|
2719
|
+
_v = SWIG_CheckState(res);
|
2720
|
+
if (_v) {
|
2721
|
+
return _wrap_File_strip__SWIG_1(nargs, args, self);
|
2722
|
+
}
|
2723
|
+
}
|
2724
|
+
if (argc == 2) {
|
2725
|
+
int _v;
|
2726
|
+
void *vptr = 0;
|
2727
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__RIFF__WAV__File, 0);
|
2728
|
+
_v = SWIG_CheckState(res);
|
2729
|
+
if (_v) {
|
2730
|
+
{
|
2731
|
+
int res = SWIG_AsVal_int(argv[1], NULL);
|
2732
|
+
_v = SWIG_CheckState(res);
|
2733
|
+
}
|
2734
|
+
if (_v) {
|
2735
|
+
return _wrap_File_strip__SWIG_0(nargs, args, self);
|
2736
|
+
}
|
2737
|
+
}
|
2738
|
+
}
|
2739
|
+
|
2740
|
+
fail:
|
2741
|
+
Ruby_Format_OverloadedError( argc, 3, "File.strip",
|
2742
|
+
" void File.strip(TagLib::RIFF::WAV::File::TagTypes tags)\n"
|
2743
|
+
" void File.strip()\n");
|
2744
|
+
|
2745
|
+
return Qnil;
|
2746
|
+
}
|
2747
|
+
|
2748
|
+
|
2749
|
+
SWIGINTERN VALUE
|
2750
|
+
_wrap_File_audio_properties(int argc, VALUE *argv, VALUE self) {
|
2751
|
+
TagLib::RIFF::WAV::File *arg1 = (TagLib::RIFF::WAV::File *) 0 ;
|
2752
|
+
void *argp1 = 0 ;
|
2753
|
+
int res1 = 0 ;
|
2754
|
+
TagLib::RIFF::WAV::Properties *result = 0 ;
|
2755
|
+
VALUE vresult = Qnil;
|
2756
|
+
|
2757
|
+
if ((argc < 0) || (argc > 0)) {
|
2758
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2759
|
+
}
|
2760
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__File, 0 | 0 );
|
2761
|
+
if (!SWIG_IsOK(res1)) {
|
2762
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File const *","audioProperties", 1, self ));
|
2692
2763
|
}
|
2693
2764
|
arg1 = reinterpret_cast< TagLib::RIFF::WAV::File * >(argp1);
|
2694
2765
|
result = (TagLib::RIFF::WAV::Properties *)((TagLib::RIFF::WAV::File const *)arg1)->audioProperties();
|
@@ -2700,7 +2771,7 @@ fail:
|
|
2700
2771
|
|
2701
2772
|
|
2702
2773
|
SWIGINTERN VALUE
|
2703
|
-
|
2774
|
+
_wrap_File_save__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
2704
2775
|
TagLib::RIFF::WAV::File *arg1 = (TagLib::RIFF::WAV::File *) 0 ;
|
2705
2776
|
void *argp1 = 0 ;
|
2706
2777
|
int res1 = 0 ;
|
@@ -2723,6 +2794,269 @@ fail:
|
|
2723
2794
|
}
|
2724
2795
|
|
2725
2796
|
|
2797
|
+
SWIGINTERN VALUE
|
2798
|
+
_wrap_File_save__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
2799
|
+
TagLib::RIFF::WAV::File *arg1 = (TagLib::RIFF::WAV::File *) 0 ;
|
2800
|
+
TagLib::RIFF::WAV::File::TagTypes arg2 ;
|
2801
|
+
bool arg3 ;
|
2802
|
+
int arg4 ;
|
2803
|
+
void *argp1 = 0 ;
|
2804
|
+
int res1 = 0 ;
|
2805
|
+
int val2 ;
|
2806
|
+
int ecode2 = 0 ;
|
2807
|
+
bool val3 ;
|
2808
|
+
int ecode3 = 0 ;
|
2809
|
+
int val4 ;
|
2810
|
+
int ecode4 = 0 ;
|
2811
|
+
bool result;
|
2812
|
+
VALUE vresult = Qnil;
|
2813
|
+
|
2814
|
+
if ((argc < 3) || (argc > 3)) {
|
2815
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
|
2816
|
+
}
|
2817
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__File, 0 | 0 );
|
2818
|
+
if (!SWIG_IsOK(res1)) {
|
2819
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File *","save", 1, self ));
|
2820
|
+
}
|
2821
|
+
arg1 = reinterpret_cast< TagLib::RIFF::WAV::File * >(argp1);
|
2822
|
+
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
2823
|
+
if (!SWIG_IsOK(ecode2)) {
|
2824
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File::TagTypes","save", 2, argv[0] ));
|
2825
|
+
}
|
2826
|
+
arg2 = static_cast< TagLib::RIFF::WAV::File::TagTypes >(val2);
|
2827
|
+
ecode3 = SWIG_AsVal_bool(argv[1], &val3);
|
2828
|
+
if (!SWIG_IsOK(ecode3)) {
|
2829
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","save", 3, argv[1] ));
|
2830
|
+
}
|
2831
|
+
arg3 = static_cast< bool >(val3);
|
2832
|
+
ecode4 = SWIG_AsVal_int(argv[2], &val4);
|
2833
|
+
if (!SWIG_IsOK(ecode4)) {
|
2834
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","save", 4, argv[2] ));
|
2835
|
+
}
|
2836
|
+
arg4 = static_cast< int >(val4);
|
2837
|
+
result = (bool)(arg1)->save(arg2,arg3,arg4);
|
2838
|
+
vresult = SWIG_From_bool(static_cast< bool >(result));
|
2839
|
+
return vresult;
|
2840
|
+
fail:
|
2841
|
+
return Qnil;
|
2842
|
+
}
|
2843
|
+
|
2844
|
+
|
2845
|
+
SWIGINTERN VALUE
|
2846
|
+
_wrap_File_save__SWIG_2(int argc, VALUE *argv, VALUE self) {
|
2847
|
+
TagLib::RIFF::WAV::File *arg1 = (TagLib::RIFF::WAV::File *) 0 ;
|
2848
|
+
TagLib::RIFF::WAV::File::TagTypes arg2 ;
|
2849
|
+
bool arg3 ;
|
2850
|
+
void *argp1 = 0 ;
|
2851
|
+
int res1 = 0 ;
|
2852
|
+
int val2 ;
|
2853
|
+
int ecode2 = 0 ;
|
2854
|
+
bool val3 ;
|
2855
|
+
int ecode3 = 0 ;
|
2856
|
+
bool result;
|
2857
|
+
VALUE vresult = Qnil;
|
2858
|
+
|
2859
|
+
if ((argc < 2) || (argc > 2)) {
|
2860
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
2861
|
+
}
|
2862
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__File, 0 | 0 );
|
2863
|
+
if (!SWIG_IsOK(res1)) {
|
2864
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File *","save", 1, self ));
|
2865
|
+
}
|
2866
|
+
arg1 = reinterpret_cast< TagLib::RIFF::WAV::File * >(argp1);
|
2867
|
+
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
2868
|
+
if (!SWIG_IsOK(ecode2)) {
|
2869
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File::TagTypes","save", 2, argv[0] ));
|
2870
|
+
}
|
2871
|
+
arg2 = static_cast< TagLib::RIFF::WAV::File::TagTypes >(val2);
|
2872
|
+
ecode3 = SWIG_AsVal_bool(argv[1], &val3);
|
2873
|
+
if (!SWIG_IsOK(ecode3)) {
|
2874
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","save", 3, argv[1] ));
|
2875
|
+
}
|
2876
|
+
arg3 = static_cast< bool >(val3);
|
2877
|
+
result = (bool)(arg1)->save(arg2,arg3);
|
2878
|
+
vresult = SWIG_From_bool(static_cast< bool >(result));
|
2879
|
+
return vresult;
|
2880
|
+
fail:
|
2881
|
+
return Qnil;
|
2882
|
+
}
|
2883
|
+
|
2884
|
+
|
2885
|
+
SWIGINTERN VALUE
|
2886
|
+
_wrap_File_save__SWIG_3(int argc, VALUE *argv, VALUE self) {
|
2887
|
+
TagLib::RIFF::WAV::File *arg1 = (TagLib::RIFF::WAV::File *) 0 ;
|
2888
|
+
TagLib::RIFF::WAV::File::TagTypes arg2 ;
|
2889
|
+
void *argp1 = 0 ;
|
2890
|
+
int res1 = 0 ;
|
2891
|
+
int val2 ;
|
2892
|
+
int ecode2 = 0 ;
|
2893
|
+
bool result;
|
2894
|
+
VALUE vresult = Qnil;
|
2895
|
+
|
2896
|
+
if ((argc < 1) || (argc > 1)) {
|
2897
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2898
|
+
}
|
2899
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__File, 0 | 0 );
|
2900
|
+
if (!SWIG_IsOK(res1)) {
|
2901
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File *","save", 1, self ));
|
2902
|
+
}
|
2903
|
+
arg1 = reinterpret_cast< TagLib::RIFF::WAV::File * >(argp1);
|
2904
|
+
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
2905
|
+
if (!SWIG_IsOK(ecode2)) {
|
2906
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File::TagTypes","save", 2, argv[0] ));
|
2907
|
+
}
|
2908
|
+
arg2 = static_cast< TagLib::RIFF::WAV::File::TagTypes >(val2);
|
2909
|
+
result = (bool)(arg1)->save(arg2);
|
2910
|
+
vresult = SWIG_From_bool(static_cast< bool >(result));
|
2911
|
+
return vresult;
|
2912
|
+
fail:
|
2913
|
+
return Qnil;
|
2914
|
+
}
|
2915
|
+
|
2916
|
+
|
2917
|
+
SWIGINTERN VALUE _wrap_File_save(int nargs, VALUE *args, VALUE self) {
|
2918
|
+
int argc;
|
2919
|
+
VALUE argv[5];
|
2920
|
+
int ii;
|
2921
|
+
|
2922
|
+
argc = nargs + 1;
|
2923
|
+
argv[0] = self;
|
2924
|
+
if (argc > 5) SWIG_fail;
|
2925
|
+
for (ii = 1; (ii < argc); ++ii) {
|
2926
|
+
argv[ii] = args[ii-1];
|
2927
|
+
}
|
2928
|
+
if (argc == 1) {
|
2929
|
+
int _v;
|
2930
|
+
void *vptr = 0;
|
2931
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__RIFF__WAV__File, 0);
|
2932
|
+
_v = SWIG_CheckState(res);
|
2933
|
+
if (_v) {
|
2934
|
+
return _wrap_File_save__SWIG_0(nargs, args, self);
|
2935
|
+
}
|
2936
|
+
}
|
2937
|
+
if (argc == 2) {
|
2938
|
+
int _v;
|
2939
|
+
void *vptr = 0;
|
2940
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__RIFF__WAV__File, 0);
|
2941
|
+
_v = SWIG_CheckState(res);
|
2942
|
+
if (_v) {
|
2943
|
+
{
|
2944
|
+
int res = SWIG_AsVal_int(argv[1], NULL);
|
2945
|
+
_v = SWIG_CheckState(res);
|
2946
|
+
}
|
2947
|
+
if (_v) {
|
2948
|
+
return _wrap_File_save__SWIG_3(nargs, args, self);
|
2949
|
+
}
|
2950
|
+
}
|
2951
|
+
}
|
2952
|
+
if (argc == 3) {
|
2953
|
+
int _v;
|
2954
|
+
void *vptr = 0;
|
2955
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__RIFF__WAV__File, 0);
|
2956
|
+
_v = SWIG_CheckState(res);
|
2957
|
+
if (_v) {
|
2958
|
+
{
|
2959
|
+
int res = SWIG_AsVal_int(argv[1], NULL);
|
2960
|
+
_v = SWIG_CheckState(res);
|
2961
|
+
}
|
2962
|
+
if (_v) {
|
2963
|
+
{
|
2964
|
+
int res = SWIG_AsVal_bool(argv[2], NULL);
|
2965
|
+
_v = SWIG_CheckState(res);
|
2966
|
+
}
|
2967
|
+
if (_v) {
|
2968
|
+
return _wrap_File_save__SWIG_2(nargs, args, self);
|
2969
|
+
}
|
2970
|
+
}
|
2971
|
+
}
|
2972
|
+
}
|
2973
|
+
if (argc == 4) {
|
2974
|
+
int _v;
|
2975
|
+
void *vptr = 0;
|
2976
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TagLib__RIFF__WAV__File, 0);
|
2977
|
+
_v = SWIG_CheckState(res);
|
2978
|
+
if (_v) {
|
2979
|
+
{
|
2980
|
+
int res = SWIG_AsVal_int(argv[1], NULL);
|
2981
|
+
_v = SWIG_CheckState(res);
|
2982
|
+
}
|
2983
|
+
if (_v) {
|
2984
|
+
{
|
2985
|
+
int res = SWIG_AsVal_bool(argv[2], NULL);
|
2986
|
+
_v = SWIG_CheckState(res);
|
2987
|
+
}
|
2988
|
+
if (_v) {
|
2989
|
+
{
|
2990
|
+
int res = SWIG_AsVal_int(argv[3], NULL);
|
2991
|
+
_v = SWIG_CheckState(res);
|
2992
|
+
}
|
2993
|
+
if (_v) {
|
2994
|
+
return _wrap_File_save__SWIG_1(nargs, args, self);
|
2995
|
+
}
|
2996
|
+
}
|
2997
|
+
}
|
2998
|
+
}
|
2999
|
+
}
|
3000
|
+
|
3001
|
+
fail:
|
3002
|
+
Ruby_Format_OverloadedError( argc, 5, "File.save",
|
3003
|
+
" bool File.save()\n"
|
3004
|
+
" bool File.save(TagLib::RIFF::WAV::File::TagTypes tags, bool stripOthers, int id3v2Version)\n"
|
3005
|
+
" bool File.save(TagLib::RIFF::WAV::File::TagTypes tags, bool stripOthers)\n"
|
3006
|
+
" bool File.save(TagLib::RIFF::WAV::File::TagTypes tags)\n");
|
3007
|
+
|
3008
|
+
return Qnil;
|
3009
|
+
}
|
3010
|
+
|
3011
|
+
|
3012
|
+
SWIGINTERN VALUE
|
3013
|
+
_wrap_File_id3v2_tagq___(int argc, VALUE *argv, VALUE self) {
|
3014
|
+
TagLib::RIFF::WAV::File *arg1 = (TagLib::RIFF::WAV::File *) 0 ;
|
3015
|
+
void *argp1 = 0 ;
|
3016
|
+
int res1 = 0 ;
|
3017
|
+
bool result;
|
3018
|
+
VALUE vresult = Qnil;
|
3019
|
+
|
3020
|
+
if ((argc < 0) || (argc > 0)) {
|
3021
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3022
|
+
}
|
3023
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__File, 0 | 0 );
|
3024
|
+
if (!SWIG_IsOK(res1)) {
|
3025
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File const *","hasID3v2Tag", 1, self ));
|
3026
|
+
}
|
3027
|
+
arg1 = reinterpret_cast< TagLib::RIFF::WAV::File * >(argp1);
|
3028
|
+
result = (bool)((TagLib::RIFF::WAV::File const *)arg1)->hasID3v2Tag();
|
3029
|
+
vresult = SWIG_From_bool(static_cast< bool >(result));
|
3030
|
+
return vresult;
|
3031
|
+
fail:
|
3032
|
+
return Qnil;
|
3033
|
+
}
|
3034
|
+
|
3035
|
+
|
3036
|
+
SWIGINTERN VALUE
|
3037
|
+
_wrap_File_info_tagq___(int argc, VALUE *argv, VALUE self) {
|
3038
|
+
TagLib::RIFF::WAV::File *arg1 = (TagLib::RIFF::WAV::File *) 0 ;
|
3039
|
+
void *argp1 = 0 ;
|
3040
|
+
int res1 = 0 ;
|
3041
|
+
bool result;
|
3042
|
+
VALUE vresult = Qnil;
|
3043
|
+
|
3044
|
+
if ((argc < 0) || (argc > 0)) {
|
3045
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3046
|
+
}
|
3047
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_TagLib__RIFF__WAV__File, 0 | 0 );
|
3048
|
+
if (!SWIG_IsOK(res1)) {
|
3049
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "TagLib::RIFF::WAV::File const *","hasInfoTag", 1, self ));
|
3050
|
+
}
|
3051
|
+
arg1 = reinterpret_cast< TagLib::RIFF::WAV::File * >(argp1);
|
3052
|
+
result = (bool)((TagLib::RIFF::WAV::File const *)arg1)->hasInfoTag();
|
3053
|
+
vresult = SWIG_From_bool(static_cast< bool >(result));
|
3054
|
+
return vresult;
|
3055
|
+
fail:
|
3056
|
+
return Qnil;
|
3057
|
+
}
|
3058
|
+
|
3059
|
+
|
2726
3060
|
SWIGINTERN VALUE
|
2727
3061
|
_wrap_File_close(int argc, VALUE *argv, VALUE self) {
|
2728
3062
|
TagLib::RIFF::WAV::File *arg1 = (TagLib::RIFF::WAV::File *) 0 ;
|
@@ -3054,11 +3388,14 @@ SWIGEXPORT void Init_taglib_wav(void) {
|
|
3054
3388
|
SWIG_TypeClientData(SWIGTYPE_p_TagLib__RIFF__WAV__Properties, (void *) &SwigClassProperties);
|
3055
3389
|
rb_define_alloc_func(SwigClassProperties.klass, _wrap_Properties_allocate);
|
3056
3390
|
rb_define_method(SwigClassProperties.klass, "initialize", VALUEFUNC(_wrap_new_Properties), -1);
|
3057
|
-
rb_define_method(SwigClassProperties.klass, "
|
3391
|
+
rb_define_method(SwigClassProperties.klass, "length_in_seconds", VALUEFUNC(_wrap_Properties_length_in_seconds), -1);
|
3392
|
+
rb_define_method(SwigClassProperties.klass, "length_in_milliseconds", VALUEFUNC(_wrap_Properties_length_in_milliseconds), -1);
|
3058
3393
|
rb_define_method(SwigClassProperties.klass, "bitrate", VALUEFUNC(_wrap_Properties_bitrate), -1);
|
3059
3394
|
rb_define_method(SwigClassProperties.klass, "sample_rate", VALUEFUNC(_wrap_Properties_sample_rate), -1);
|
3060
3395
|
rb_define_method(SwigClassProperties.klass, "channels", VALUEFUNC(_wrap_Properties_channels), -1);
|
3061
|
-
rb_define_method(SwigClassProperties.klass, "
|
3396
|
+
rb_define_method(SwigClassProperties.klass, "bits_per_sample", VALUEFUNC(_wrap_Properties_bits_per_sample), -1);
|
3397
|
+
rb_define_method(SwigClassProperties.klass, "sample_frames", VALUEFUNC(_wrap_Properties_sample_frames), -1);
|
3398
|
+
rb_define_method(SwigClassProperties.klass, "format", VALUEFUNC(_wrap_Properties_format), -1);
|
3062
3399
|
SwigClassProperties.mark = 0;
|
3063
3400
|
SwigClassProperties.destroy = (void (*)(void *)) free_TagLib_RIFF_WAV_Properties;
|
3064
3401
|
SwigClassProperties.trackObjects = 1;
|
@@ -3067,9 +3404,17 @@ SWIGEXPORT void Init_taglib_wav(void) {
|
|
3067
3404
|
SWIG_TypeClientData(SWIGTYPE_p_TagLib__RIFF__WAV__File, (void *) &SwigClassFile);
|
3068
3405
|
rb_define_alloc_func(SwigClassFile.klass, _wrap_File_allocate);
|
3069
3406
|
rb_define_method(SwigClassFile.klass, "initialize", VALUEFUNC(_wrap_new_File), -1);
|
3407
|
+
rb_define_const(SwigClassFile.klass, "NoTags", SWIG_From_int(static_cast< int >(TagLib::RIFF::WAV::File::NoTags)));
|
3408
|
+
rb_define_const(SwigClassFile.klass, "ID3v2", SWIG_From_int(static_cast< int >(TagLib::RIFF::WAV::File::ID3v2)));
|
3409
|
+
rb_define_const(SwigClassFile.klass, "Info", SWIG_From_int(static_cast< int >(TagLib::RIFF::WAV::File::Info)));
|
3410
|
+
rb_define_const(SwigClassFile.klass, "AllTags", SWIG_From_int(static_cast< int >(TagLib::RIFF::WAV::File::AllTags)));
|
3070
3411
|
rb_define_method(SwigClassFile.klass, "tag", VALUEFUNC(_wrap_File_tag), -1);
|
3412
|
+
rb_define_method(SwigClassFile.klass, "id3v2_tag", VALUEFUNC(_wrap_File_id3v2_tag), -1);
|
3413
|
+
rb_define_method(SwigClassFile.klass, "strip", VALUEFUNC(_wrap_File_strip), -1);
|
3071
3414
|
rb_define_method(SwigClassFile.klass, "audio_properties", VALUEFUNC(_wrap_File_audio_properties), -1);
|
3072
3415
|
rb_define_method(SwigClassFile.klass, "save", VALUEFUNC(_wrap_File_save), -1);
|
3416
|
+
rb_define_method(SwigClassFile.klass, "id3v2_tag?", VALUEFUNC(_wrap_File_id3v2_tagq___), -1);
|
3417
|
+
rb_define_method(SwigClassFile.klass, "info_tag?", VALUEFUNC(_wrap_File_info_tagq___), -1);
|
3073
3418
|
rb_define_method(SwigClassFile.klass, "close", VALUEFUNC(_wrap_File_close), -1);
|
3074
3419
|
SwigClassFile.mark = 0;
|
3075
3420
|
SwigClassFile.destroy = (void (*)(void *)) free_taglib_riff_wav_file;
|