mhWaveEdit cutdown available if wanted

Audio editors, music players, video players, burning software, etc.
Post Reply
Message
Author
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

mhWaveEdit cutdown available if wanted

#1 Post by technosaurus »

I was able to cut down libsamplerate by over 1MB by removing the high sample rates... then, since mhwaveedit was the only program using it, I went ahead and compiled it in statically with only support for low and medium level support (it compiled fine with no errors using the cutdown libsamplerate).

If you want to know why, take a look at the corresponding 8MB header file in the sources - there has to be a better way to code these than a gigantic pseudo-array - a mathematical formula or something.

If there is any interest in either the cutdown libsamplerate or mhwaveedit I will post as a separate package.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

Re: mhWaveEdit cutdown available if wanted

#2 Post by ttuuxxx »

technosaurus wrote:I was able to cut down libsamplerate by over 1MB by removing the high sample rates... then, since mhwaveedit was the only program using it, I went ahead and compiled it in statically with only support for low and medium level support (it compiled fine with no errors using the cutdown libsamplerate).

If you want to know why, take a look at the corresponding 8MB header file in the sources - there has to be a better way to code these than a gigantic pseudo-array - a mathematical formula or something.

If there is any interest in either the cutdown libsamplerate or mhwaveedit I will post as a separate package.
I like the older libsamplerate, it might not be as good, but its way smaller, around 100kb pet size, here's the sources if you want :)
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#3 Post by zigbert »

What is exactly the high samplerates ? - Compared to low and medium.
Do you have any numbers?


Sigmund

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#4 Post by technosaurus »

They are actually referred to as slow_high_qual_coeffs_s

begins with

/*
** f = make_src_filter (cycles = 69, incr = 2381, atten = 160.000000)
**
** Stop band atten. : 154.67 dB
** -3dB band width : 1.922
** half length : 340238
** increment : 2381
*/

static const struct slow_high_qual_coeffs_s
{ int increment ;
coeff_t coeffs [340239] ;
} slow_high_qual_coeffs =
{ 2381,
{
9.657284235393746030e-01,
9.657281621412726613e-01,
9.657273779472256292e-01,

.... ends with (about 34,000 lines later) ....

-1.063995337710716955e-11,
-7.606277514128185034e-12,
-4.574900362231218435e-12,
0.0 /* Need a final zero coefficient */
}
} ; /* high_qual_coeffs */

if I were back in school I could enter the point into Mathematica to get the formula and make an approximation

to patch I simply commented out some stuff in src_sinc.c
#include "high_qual_coeffs.h"
and the lines between
case SRC_SINC_BEST_QUALITY :
and
break;

but it may be better to just cut and paste the medium quality code or use
return SRC_ERR_BAD_CONVERTER ;

maybe someone who actually codes in C can advise?
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#5 Post by technosaurus »

here is the explanation

SRC_SINC_FASTEST : "Band limited sinc interpolation, fastest, 97dB SNR, 80% BW." ;
SRC_SINC_MEDIUM_QUALITY :"Band limited sinc interpolation, medium quality, 121dB SNR, 90% BW." ;
SRC_SINC_BEST_QUALITY :"Band limited sinc interpolation, best quality, 145dB SNR, 96% BW." ;
Attachments
mh.png
limits top choice
(20.66 KiB) Downloaded 1275 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply