projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1ece4f8
)
src/fmat.c: new_fmat() takes height as first argument
author
Paul Brossier
<piem@piem.org>
Tue, 17 Dec 2013 16:30:13 +0000
(11:30 -0500)
committer
Paul Brossier
<piem@piem.org>
Tue, 17 Dec 2013 16:30:13 +0000
(11:30 -0500)
src/fmat.c
patch
|
blob
|
history
src/fmat.h
patch
|
blob
|
history
src/io/audio_unit.c
patch
|
blob
|
history
src/spectral/filterbank.c
patch
|
blob
|
history
src/spectral/mfcc.c
patch
|
blob
|
history
src/synth/sampler.c
patch
|
blob
|
history
tests/src/io/test-source_multi.c
patch
|
blob
|
history
tests/src/test-fmat.c
patch
|
blob
|
history
diff --git
a/src/fmat.c
b/src/fmat.c
index
978abb7
..
09b3a8c
100644
(file)
--- a/
src/fmat.c
+++ b/
src/fmat.c
@@
-21,7
+21,7
@@
#include "aubio_priv.h"
#include "fmat.h"
#include "aubio_priv.h"
#include "fmat.h"
-fmat_t * new_fmat (uint_t
length, uint_t height
) {
+fmat_t * new_fmat (uint_t
height, uint_t length
) {
if ((sint_t)length <= 0 || (sint_t)height <= 0 ) {
return NULL;
}
if ((sint_t)length <= 0 || (sint_t)height <= 0 ) {
return NULL;
}
diff --git
a/src/fmat.h
b/src/fmat.h
index
800af5d
..
363965e
100644
(file)
--- a/
src/fmat.h
+++ b/
src/fmat.h
@@
-49,7
+49,7
@@
typedef struct {
\param height the height of the matrix to create
*/
\param height the height of the matrix to create
*/
-fmat_t * new_fmat(uint_t
length, uint_t height
);
+fmat_t * new_fmat(uint_t
height, uint_t length
);
/** fmat_t buffer deletion function
/** fmat_t buffer deletion function
diff --git
a/src/io/audio_unit.c
b/src/io/audio_unit.c
index
53c1a24
..
00f742d
100644
(file)
--- a/
src/io/audio_unit.c
+++ b/
src/io/audio_unit.c
@@
-104,8
+104,8
@@
aubio_audio_unit_t * new_aubio_audio_unit(uint_t samplerate,
o->au_ios_inbuf = AUBIO_ARRAY(SInt16, AU_IOS_MAX_FRAMES * o->hw_input_channels);
/* the floats coming from and to the device callback */
o->au_ios_inbuf = AUBIO_ARRAY(SInt16, AU_IOS_MAX_FRAMES * o->hw_input_channels);
/* the floats coming from and to the device callback */
- o->output_frames = new_fmat(
blocksize, sw_output_channels
);
- o->input_frames = new_fmat(
blocksize, sw_input_channels
);
+ o->output_frames = new_fmat(
sw_output_channels, blocksize
);
+ o->input_frames = new_fmat(
sw_input_channels, blocksize
);
/* check for some sizes */
if ( o->hw_output_channels != o->output_frames->height ) {
/* check for some sizes */
if ( o->hw_output_channels != o->output_frames->height ) {
diff --git
a/src/spectral/filterbank.c
b/src/spectral/filterbank.c
index
39dfa5d
..
f8678e5
100644
(file)
--- a/
src/spectral/filterbank.c
+++ b/
src/spectral/filterbank.c
@@
-43,7
+43,7
@@
new_aubio_filterbank (uint_t n_filters, uint_t win_s)
fb->n_filters = n_filters;
/* allocate filter tables, a matrix of length win_s and of height n_filters */
fb->n_filters = n_filters;
/* allocate filter tables, a matrix of length win_s and of height n_filters */
- fb->filters = new_fmat (
win_s / 2 + 1, n_filters
);
+ fb->filters = new_fmat (
n_filters, win_s / 2 + 1
);
return fb;
}
return fb;
}
diff --git
a/src/spectral/mfcc.c
b/src/spectral/mfcc.c
index
25dbf0e
..
a71a6a5
100644
(file)
--- a/
src/spectral/mfcc.c
+++ b/
src/spectral/mfcc.c
@@
-66,7
+66,7
@@
new_aubio_mfcc (uint_t win_s, uint_t n_filters, uint_t n_coefs,
/* allocating buffers */
mfcc->in_dct = new_fvec (n_filters);
/* allocating buffers */
mfcc->in_dct = new_fvec (n_filters);
- mfcc->dct_coeffs = new_fmat (n_
coefs, n_filter
s);
+ mfcc->dct_coeffs = new_fmat (n_
filters, n_coef
s);
/* compute DCT transform dct_coeffs[i][j] as
cos ( j * (i+.5) * PI / n_filters ) */
/* compute DCT transform dct_coeffs[i][j] as
cos ( j * (i+.5) * PI / n_filters ) */
diff --git
a/src/synth/sampler.c
b/src/synth/sampler.c
index
e6ee809
..
d6e5fd3
100644
(file)
--- a/
src/synth/sampler.c
+++ b/
src/synth/sampler.c
@@
-42,7
+42,7
@@
aubio_sampler_t *new_aubio_sampler(uint_t samplerate, uint_t blocksize)
s->samplerate = samplerate;
s->blocksize = blocksize;
s->source_output = new_fvec(blocksize);
s->samplerate = samplerate;
s->blocksize = blocksize;
s->source_output = new_fvec(blocksize);
- s->source_output_multi = new_fmat(
blocksize, 4
);
+ s->source_output_multi = new_fmat(
4, blocksize
);
s->source = NULL;
s->playing = 0;
return s;
s->source = NULL;
s->playing = 0;
return s;
diff --git
a/tests/src/io/test-source_multi.c
b/tests/src/io/test-source_multi.c
index
853f028
..
b3b4683
100644
(file)
--- a/
tests/src/io/test-source_multi.c
+++ b/
tests/src/io/test-source_multi.c
@@
-38,7
+38,7
@@
int main (int argc, char **argv)
if ( n_channels == 0 ) n_channels = aubio_source_get_channels(s);
if ( n_channels == 0 ) n_channels = aubio_source_get_channels(s);
- fmat_t *mat = new_fmat(
hop_size, n_channels
);
+ fmat_t *mat = new_fmat(
n_channels, hop_size
);
do {
aubio_source_do_multi (s, mat, &read);
do {
aubio_source_do_multi (s, mat, &read);
diff --git
a/tests/src/test-fmat.c
b/tests/src/test-fmat.c
index
3de0461
..
718903d
100644
(file)
--- a/
tests/src/test-fmat.c
+++ b/
tests/src/test-fmat.c
@@
-8,7
+8,7
@@
int main ()
{
uint_t height = 3, length = 9, i, j;
// create fmat_t object
{
uint_t height = 3, length = 9, i, j;
// create fmat_t object
- fmat_t * mat = new_fmat (
length, height
);
+ fmat_t * mat = new_fmat (
height, length
);
for ( i = 0; i < mat->height; i++ ) {
for ( j = 0; j < mat->length; j++ ) {
// all elements are already initialized to 0.
for ( i = 0; i < mat->height; i++ ) {
for ( j = 0; j < mat->length; j++ ) {
// all elements are already initialized to 0.