[Clam-devel] main.cxx for Constructing_and_playing_a_simple_network: GetAudioFile()

David García Garzón dgarcia at iua.upf.edu
Sun Mar 30 16:27:56 PDT 2008


Yes, sorry, we forgot to update the example after changes in last releases. 
Now the example is up to date and compiling again.

The AudioFile object, that contains the file header, became a hidden 
implementation class. We added a GetHeader method on the processings to 
access such information which leads to a simpler interface. Also a cast to 
the concrete processing class was also needed to be able to use such a 
method.

Thanks for noticing it out.

David.


On Dilluns 31 Març 2008, Han, Yushen wrote:
> Hi, everyone
>
> I write to report something about the main.cxx code at this page:
> http://clam.iua.upf.edu/wikis/clam/index.php/Constructing_and_playing_a_sim
>ple_network
>
> Having played with the Network Editor with the GUI for a while,
> I was trying to CODE with CLAM by constructing and playing a simple network
> http://clam.iua.upf.edu/wikis/clam/index.php/Constructing_and_playing_a_sim
>ple_network
>
> I used the SConstruct file from
> http://clam.iua.upf.edu/wikis/clam/index.php/Minimal_SConstruct_to_build_wi
>th_CLAM_and_Qt4 to build my simple network ( contained in main.cxx ).
>
> However, it complained
>
> scons: Reading SConscript files ...
> scons: done reading SConscript files.
> scons: Building targets ...
> g++ -o main.o -c -DQT_CORE_LIB -DQT_GUI_LIB -DCLAM_FLOAT -D_DEBUG
> -DUSE_PTHREADS=1 -DUSE_XERCES=1 -DCLAM_USE_XML -DUSE_SNDFILE=1
> -DUSE_OGGVORBIS=1 -DWITH_VORBIS=1 -DUSE_MAD=1 -DWITH_MAD=1 -DUSE_ID3=1
> -DUSE_PORTAUDIO=1 -D__MACOSX_CORE__ -DUSE_RTAUDIO=1 -DUSE_FFTW3=1
> -I/usr/local/Qt4.3/include/qt4 -I/usr/local/Qt4.3/include/qt4/QtCore
> -I/usr/local/Qt4.3/include/qt4/QtGui -I/usr/local/include
> -I/opt/local/include main.cxx
> main.cxx: In function 'int main(int, char**)':
> main.cxx:26: error: 'class CLAM::Processing' has no member named
> 'GetAudioFile' scons: *** [main.o] Error 1
>
> The problem is located in
> "int length =
> network.GetProcessing(reader).GetAudioFile().GetHeader().GetLength()/1000;"
>
> I looked into network.hxx which did have a GetProcessing(), but
> processing.hxx did not have GetAudioFile() at all.
> (See http://clam.iua.upf.edu/doc/CLAM-doxygen/Processing_8hxx-source.html)
>
> I even searched all the CLAM source code for "GetHeader" but did not get
> any.
>
> Is this a bug in the tutorial or in the code?
> http://clam.iua.upf.edu/wikis/clam/index.php/Constructing_and_playing_a_sim
>ple_network
>
> Maybe you have encountered this a lot since it is almost the first
> developing document
> for "Programming with CLAM"...
>
> I look forward to your information.
>
> Best regards,
> Han, Yushen
>
> _______________________________________________
> Clam-devel mailing list
> Clam-devel at llistes.projectes.lafarga.org
> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel



-- 
David García Garzón
(Work) dgarcia at iua dot upf anotherdot es
http://www.iua.upf.edu/~dgarcia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20080331/ce8b02af/attachment-0001.sig>


More information about the clam-devel mailing list