ofa 1.1 → 1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/ofa.cpp +27 -7
- metadata +4 -4
data/ext/ofa.cpp
CHANGED
@@ -1893,13 +1893,13 @@ SWIG_From_int (int value)
|
|
1893
1893
|
}
|
1894
1894
|
|
1895
1895
|
|
1896
|
-
const char *wrap_create_fingerprint(const char *data, long size, int sRate,
|
1896
|
+
const char *wrap_create_fingerprint(const char *data, long size, int sRate, bool stereo) {
|
1897
1897
|
#ifdef WORDS_BIGENDIAN
|
1898
1898
|
#define ENDIANESS (1)
|
1899
1899
|
#else
|
1900
1900
|
#define ENDIANESS (0)
|
1901
1901
|
#endif
|
1902
|
-
return ofa_create_print((unsigned char *)data, ENDIANESS, size, sRate, stereo);
|
1902
|
+
return ofa_create_print((unsigned char *)data, ENDIANESS, size, sRate, stereo ? 1 : 0);
|
1903
1903
|
}
|
1904
1904
|
|
1905
1905
|
|
@@ -2009,6 +2009,26 @@ SWIG_AsVal_int (VALUE obj, int *val)
|
|
2009
2009
|
}
|
2010
2010
|
|
2011
2011
|
|
2012
|
+
SWIGINTERN int
|
2013
|
+
SWIG_AsVal_bool (VALUE obj, bool *val)
|
2014
|
+
{
|
2015
|
+
if (obj == Qtrue) {
|
2016
|
+
if (val) *val = true;
|
2017
|
+
return SWIG_OK;
|
2018
|
+
} else if (obj == Qfalse) {
|
2019
|
+
if (val) *val = false;
|
2020
|
+
return SWIG_OK;
|
2021
|
+
} else {
|
2022
|
+
int res = 0;
|
2023
|
+
if (SWIG_AsVal_int (obj, &res) == SWIG_OK) {
|
2024
|
+
if (val) *val = res ? true : false;
|
2025
|
+
return SWIG_OK;
|
2026
|
+
}
|
2027
|
+
}
|
2028
|
+
return SWIG_TypeError;
|
2029
|
+
}
|
2030
|
+
|
2031
|
+
|
2012
2032
|
SWIGINTERNINLINE VALUE
|
2013
2033
|
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
|
2014
2034
|
{
|
@@ -2082,7 +2102,7 @@ _wrap_create_fingerprint(int argc, VALUE *argv, VALUE self) {
|
|
2082
2102
|
char *arg1 = (char *) 0 ;
|
2083
2103
|
long arg2 ;
|
2084
2104
|
int arg3 ;
|
2085
|
-
|
2105
|
+
bool arg4 ;
|
2086
2106
|
int res1 ;
|
2087
2107
|
char *buf1 = 0 ;
|
2088
2108
|
int alloc1 = 0 ;
|
@@ -2090,7 +2110,7 @@ _wrap_create_fingerprint(int argc, VALUE *argv, VALUE self) {
|
|
2090
2110
|
int ecode2 = 0 ;
|
2091
2111
|
int val3 ;
|
2092
2112
|
int ecode3 = 0 ;
|
2093
|
-
|
2113
|
+
bool val4 ;
|
2094
2114
|
int ecode4 = 0 ;
|
2095
2115
|
char *result = 0 ;
|
2096
2116
|
VALUE vresult = Qnil;
|
@@ -2113,11 +2133,11 @@ _wrap_create_fingerprint(int argc, VALUE *argv, VALUE self) {
|
|
2113
2133
|
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","wrap_create_fingerprint", 3, argv[2] ));
|
2114
2134
|
}
|
2115
2135
|
arg3 = static_cast< int >(val3);
|
2116
|
-
ecode4 =
|
2136
|
+
ecode4 = SWIG_AsVal_bool(argv[3], &val4);
|
2117
2137
|
if (!SWIG_IsOK(ecode4)) {
|
2118
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "
|
2138
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "bool","wrap_create_fingerprint", 4, argv[3] ));
|
2119
2139
|
}
|
2120
|
-
arg4 = static_cast<
|
2140
|
+
arg4 = static_cast< bool >(val4);
|
2121
2141
|
result = (char *)wrap_create_fingerprint((char const *)arg1,arg2,arg3,arg4);
|
2122
2142
|
vresult = SWIG_FromCharPtr((const char *)result);
|
2123
2143
|
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ofa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: "1.
|
8
|
+
- 2
|
9
|
+
version: "1.2"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Adriano Bonat
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-06-
|
17
|
+
date: 2010-06-26 00:00:00 -03:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|