[MSEide-MSEgui-talk] Maximum length of array of cfloat ?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[MSEide-MSEgui-talk] Maximum length of array of cfloat ?

fredvs
Hello.

Is there a maximum length for a array of cfloat?

I have problem with conversion of audio files into array of samples if
length of array is  > 20 megas. ;-(

Thanks.
.
Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Maximum length of array of cfloat ?

mse
Administrator
On Saturday 25 November 2017 18:00:00 fredvs wrote:
> Hello.
>
> Is there a maximum length for a array of cfloat?
>
> I have problem with conversion of audio files into array of samples if
> length of array is  > 20 megas. ;-(
>
What error? The array size of 4*20 megabyte should be OK.

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Maximum length of array of cfloat ?

fredvs
> What error?

Very difficult to debug...

There is that error message:
#1  6252 unknown "bpmdetect" 0x0000000000412576 in fpc_dynarray_incr_ref ()

If setlength(thebuffer) is big (have to determinate how much) ,
length(thebuffer) = -1085102592571150095 !

And then the application crash with a big memory leak. ;-(

> The array size of 4*20 megabyte should be OK.

Ha, ok, then it is something else...

Thanks.

Fre;D





--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Maximum length of array of cfloat ?

mse
Administrator
On Saturday 25 November 2017 18:22:46 fredvs wrote:
> > What error?
>
> Very difficult to debug...
>
> There is that error message:
> #1  6252 unknown "bpmdetect" 0x0000000000412576 in fpc_dynarray_incr_ref ()
>
Is this the call stack of an exception? Which exception? If the RTL has been
compiled with debuginfo there maybe will be better information.

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] Maximum length of array of cfloat ?

fredvs
Hello.

Yep, I get it ;-)

To detect the BPM of a audio file, first that file must be converted into a
buffer of samples.

This is done by a other thread.

But, on my system, after decoding +- 1 mega, the conversion become slower.

I did use a pause(length_of_file div ratio) before to use the converted
buffer to get the BPM.

But pause(length_of_file div ratio) is not enough when the audio file > 1
mega and the buffer is not fully completed.

The trick was to use:

while not thread_terminated do pause(100);

That way, the buffer is completed before to use the GetBPM function.

And it works perfectly now ;-)

Sorry for the noise.

Thanks.

Fre;D






--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk