Re: [Osalp-dev] aflibAudioSpectrum
Status: Abandoned
Brought to you by:
daservis
|
From: Darrick S. <da...@dc...> - 2002-08-19 19:22:14
|
The aflibAudioSpectrum constructor works well for me. I tried it a number of ways and the only way I can get to Seg fault is too send it a NULL reference. i.e. aflibAudioSpectrum(*(aflibAudio*)NULL); will seg fault. As a starting point make sure to always pass an aflibConfig object and aflibStatus to the aflibAudioFile constructors. Then check the ret status before continuing. In the examples directory check out the osalp example which most likely has some code you can use (examples/osalp/audioChain.cc:convert(int argc, char* argv[]) is a good function to start with). Also if you can send me a stack trace and/or the complete section of code plus Makefile which seg faults and I'll see what I can do. On Monday 19 August 2002 08:16 am, Joe Sapp wrote: > It seems that every time I try to initialize a variable of type > aflibAudioSpectrum, my program segfaults. I am trying to set a power > meter/audio spectrum callback, but it never gets to that point. Has > anybody experienced anything similar? > (code follows) > (note - I am using Qt. file is a QString and isn't empty.) > > aflibAudioFile read(AFLIB_MPEG_TYPE, (const char *)file); > > // ------------************Problem****************--------------- > aflibAudioSpectrum spec(read); > // ------------*************************************--------------- > QImage tmp_img(SPECT_WIDTH, SPECT_HEIGHT, 32); > QPixmap tmp_pixmap(SPECT_WIDTH, SPECT_HEIGHT); > > // Setting Power Meter Callback > spec.setAudioSpectrumCallback(showPower); |