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

Daniel Casanovas i Torrents dani at sms25.com
Sun Nov 30 04:35:41 PST 2003


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
> >
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MyCLAMApp.hxx
Type: application/octet-stream
Size: 390 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-users-clam-project.org/attachments/20031130/c0cea4ca/attachment-0012.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MyCLAMApp.cxx
Type: application/octet-stream
Size: 5188 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-users-clam-project.org/attachments/20031130/c0cea4ca/attachment-0013.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: settings.cfg
Type: application/octet-stream
Size: 1667 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-users-clam-project.org/attachments/20031130/c0cea4ca/attachment-0014.obj>


More information about the clam-users mailing list