[Stk] Problem with channelsOut in FileLoop
Gary Scavone
gary at ccrma.Stanford.EDU
Wed Apr 14 18:03:43 PDT 2010
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