[CLAM] the object rightChannel is not ready (II)

Xavi Rubio xrubio at iua.upf.es
Sun Nov 30 09:14:56 PST 2003


The problem is in the settings, because you must add SOURCES_AUDIODEVICE variable to the sources that the program needs to compile:

SOURCES = $(TOP)/MyCLAMApp.cxx \
        $(SOURCES_AUDIODEVICE)


As you have selected ALSA as your audio output library, this flag will contain all the needed code related to alsa.

Xavi

On Sun, 30 Nov 2003 13:35:41 +0100
"Daniel Casanovas i Torrents" <dani at sms25.com> wrote:

> Well, I'm sure that it's the processing that crashes because debugging the
> aplication it works til the rightchannel.Start() function.
> I've implemented my code learning from the Playback example, so its so
> similar (if its not the same...)
> 
>  Thanks
>  Daniel
> 
> >  ----- Original Message -----
> > From: "Xavi Rubio" <xrubio at iua.upf.es>
> > To: "Daniel Casanovas i Torrents" <dani at sms25.com>
> > Cc: <clam at iua.upf.es>
> > Sent: Saturday, November 29, 2003 11:57 PM
> > Subject: Re: [CLAM] the object rightChannel is not ready
> >
> >
> > >
> > > Are you sure that is rightchannel the processing that crashes? I see
> > > that the only processing you don't configure is mAudioIn, and the code
> > > related to audioout seems correct (if the other audiooout starts
> correctly
> > > I assume that you have the right options for audio devices).
> > >
> > > Anyway, try to see if you have any difference with this section of code
> > > in Playback example, because it should work without problems.
> > >
> > > Xavi
> > >
> > > On Sat, 29 Nov 2003 02:03:52 +0100
> > > "Daniel Casanovas i Torrents" <dani at sms25.com> wrote:
> > >
> > > > Hi all,
> > > >
> > > > First of all I'd like to thank to all the people who are helping me.
> > > >
> > > > I'm now working on the playback part of my aplication. In order to do
> > > > that, I've looked at the Playback example. In my aplication the
> > > > incoming Audio is mAudioIn.
> > > >
> > > > But when my aplic. is running CLAM says "ASSERTION FAILED". As it
> > > > says, when I do the Start() the Object is not ready. Deploying I've
> > > > found that the Object is rightchannel.
> > > >
> > > > Do I need some command I've forgotten??
> > > > Here goes my code...
> > > >
> > > >   CLAM::TSize nSamples = mAudioIn.Size();
> > > >   CLAM::TData sampleRate = mAudioIn.SampleRate();
> > > >
> > > >   CLAM::Audio   signalLeftChannel;
> > > >   CLAM::Audio   signalRightChannel;
> > > >
> > > >   signalLeftChannel.SetSize( nSamples );
> > > >   signalLeftChannel.SetSampleRate( sampleRate );
> > > >
> > > >   cout<<"mono\n";
> > > >
> > > >   if ( mAudioIn.Channels() == 2 )
> > > >   {
> > > >    cout<<"stereo\n";
> > > >    signalRightChannel.SetSize( nSamples );
> > > >    signalRightChannel.SetSampleRate( sampleRate );
> > > >   }
> > > >   else if ( mAudioIn.Channels() > 2 )
> > > >   {
> > > >    std::cerr << "Only stereo or mono files playback is supported! " <<
> > > >    std::endl; exit(-1);
> > > >   }
> > > >
> > > >   mAudioIn.Start();
> > > >
> > > >   if ( mAudioIn.Channels() == 1 )
> > > >    mAudioIn.Do( signalLeftChannel );
> > > >   else if ( mAudioIn.Channels() == 2 )
> > > >    mAudioIn.Do( signalLeftChannel, signalRightChannel );
> > > >
> > > >   mAudioIn.Stop();
> > > >
> > > >    const CLAM::TData playbackSampleRate = 44100;
> > > >   const CLAM::TSize frameSize = 1024;
> > > >
> > > >   CLAM::AudioManager theAudioManager( playbackSampleRate, frameSize );
> > > >   theAudioManager.Start();
> > > >
> > > >   CLAM::AudioOut leftChannel;
> > > >   CLAM::AudioOut rightChannel;
> > > >   CLAM::AudioIOConfig  audioOutCfg;
> > > >
> > > >   audioOutCfg.SetChannelID(0);
> > > >   leftChannel.Configure(audioOutCfg);
> > > >   audioOutCfg.SetChannelID(1);
> > > >   rightChannel.Configure(audioOutCfg);
> > > >
> > > >   leftChannel.Start();
> > > >   rightChannel.Start(); CRASH!!
> > > >
> > >
> > > _______________________________________________
> > > CLAM mailing list
> > > CLAM at iua.upf.es
> > > http://www.iua.upf.es/mtg/clam
> > >
> >
> 




More information about the clam-users mailing list