[Stk] Problem with channelsOut in FileLoop

Fabián Tommasini ftommasini at gmail.com
Thu Apr 15 05:54:50 PDT 2010

The solution works great! It's a good idea add this method in the next 
At the moment, I made a patch for distribute attached to my code.
Thank you very much.


Ing. Fabián C. Tommasini
Centro de Investigación y Transferencia en Acústica (CINTRA)
Maestro M. López esq. Cruz Roja Argentina
(X5016ZAA) Córdoba, Argentina
Tel/Fax: +54 351 4686389

Gary Scavone wrote:
> Hi Fabian,
> FileLoop has protected inheritance from FileWvIn, which means the user can only call the functions defined in FileLoop.  I did that because there were various functions defined in WvIn and FileWvIn that did not make sense for Fileloop (but at the same time, I wanted to take advantage of the various functionality of FileWvIn).
> I agree that the channelsOut() function is useful, so that needs to be reimplemented in FileLoop.  Within FileLoop, the function definition can include a call to WvIn::channelsOut().  For the time being, you can implement that yourself and I'll add it for the next release.  Just add:
>   //! Return the number of audio channels in the data or stream.
>   unsigned int channelsOut( void ) const { return data_.channels(); };
> to FileLoop.h.
> Regards,
> --gary
> On 2010-04-14, at 3:23 PM, Fabián Tommasini wrote:
>> Hi,
>> I'm trying to know the number of channels in a file that is playing 
>> through FileLoop. But, some errors appear:
>> /usr/include/stk/WvIn.h: In member function ‘bool InputWaveLoop::load()’:
>> /usr/include/stk/WvIn.h:23: error: ‘unsigned int 
>> stk::WvIn::channelsOut() const’ is inaccessible
>> input.cpp:75: error: within this context
>> input.cpp:75: error: ‘stk::WvIn’ is not an accessible base of 
>> ‘stk::FileLoop’
>> This do not occurs with FileWvIn. Why? How can I solve the problem?
>> Thanks in advance.
>> Fabián C. Tommasini
>> _______________________________________________
>> Stk mailing list
>> Stk at ccrma.stanford.edu
>> http://ccrma-mail.stanford.edu/mailman/listinfo/stk

More information about the Stk mailing list