RE: [Audacity-devel] EQ - need a little help with declarations
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Leland L. <aud...@ho...> - 2005-12-19 22:41:43
|
> > In the attached, in Equalisation.h I am declaring in li 243 > float *mdBMin; > float *mdBMax; > If I try and set *mdBMin, I get an exception. If I swap the > order of them I > get an exception if I try and set *mdBMax. > In EqualizationDialog you've declared mdBMax as a pointer to the float and not the float itself. Then in MakeEqualizationDialog you attempt to set the float, but the pointer would be invalid as you've never allocated the storage for the float. Many ways to skin it, but you could... change: *mdBMax = 30.; to: mdBMax = 30.; and: mFilterFuncR, mFilterFuncI, mWindowSize, mM, mdBMax, to: mFilterFuncR, mFilterFuncI, mWindowSize, mM, &mdBMax, Or you could just... change: *mdBMax = 30.; to: mdBMax = new float(30.); (but you'll have to delete it later) Leland |