[CLAM] the object rightChannel is not ready (II)
Daniel Casanovas i Torrents
dani at sms25.com
Sun Nov 30 15:55:59 PST 2003
Hi,
I've changed and rebuild the projecte but it continues crashing... Its
rarely because my Playback example runs perfectly.
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: Sunday, November 30, 2003 6:14 PM
Subject: Re: [CLAM] the object rightChannel is not ready (II)
>
> 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
> > > >
> > >
> >
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: settings.cfg
Type: application/octet-stream
Size: 1697 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-users-clam-project.org/attachments/20031201/fc74f6f8/attachment-0015.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/20031201/fc74f6f8/attachment-0016.obj>
-------------- 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/20031201/fc74f6f8/attachment-0017.obj>
More information about the clam-users
mailing list