[CLAM] the object rightChannel is not ready

Xavi Rubio xrubio at iua.upf.es
Sat Nov 29 14:57:52 PST 2003


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!!
> 




More information about the clam-users mailing list