×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    24

    help~~~about the CMdaAudioInputStream

    I am trying use the CMdaAudioInputStream to record sound data .the Panic comes up when i debug the program.I don't know why~~~
    Code:
       116.950	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       116.950	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       116.950	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       116.950	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       116.950	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       116.990	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       117.200	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       117.200	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       117.200	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       117.200	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       117.200	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       117.240	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       117.465	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       117.465	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       117.465	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       117.470	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       117.470	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       117.505	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       117.715	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       117.715	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       117.715	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       117.715	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       117.715	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       117.755	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       117.970	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       117.970	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       117.970	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       117.975	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       117.975	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       118.005	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       118.230	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       118.230	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       118.230	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       118.230	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       118.230	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       118.270	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       118.485	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       118.485	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       118.485	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       118.490	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       118.490	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       118.525	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       118.745	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       118.745	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       118.745	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       118.745	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       118.745	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       118.785	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       118.990	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       118.990	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       118.990	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       118.995	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       118.995	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       119.035	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       119.250	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       119.250	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       119.250	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       119.250	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       119.250	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       119.295	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       119.520	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       119.520	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       119.520	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       119.520	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       119.520	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       119.565	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       119.765	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       119.765	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       119.765	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       119.765	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       119.765	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       119.800	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       120.025	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       120.025	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       120.025	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       120.025	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       120.025	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       120.065	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       120.270	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       120.270	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       120.270	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       120.270	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       120.270	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       120.315	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       120.530	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       120.530	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       120.530	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       120.530	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       120.530	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       120.565	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       120.795	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       120.795	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       120.795	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       120.800	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>ENTR
       120.800	3c400310:CMMFDevSoundAdaptation::CBody::RecordData()>EXIT
       120.830	WSOCK: ServProvider: [0DD2409C] sending 4108 bytes
       121.550	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>ENTR
       121.550	CMMFDevSoundSession[0x3c400238]::BufferToBeEmptied - Exit [0]
       121.550	3c400310:CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer(CMMFBuffer &)>EXIT
       121.555	3c400310:CMMFDevSoundAdaptation::CBody::Stopped()>ENTR
       121.555	3c400310:CMMFDevSoundAdaptation::CBody::UpdateBytesPlayed()>ENTR
       121.555	3c400310:CMMFDevSoundAdaptation::CBody::UpdateBytesPlayed()>EXIT
       121.555	3c400310:CMMFDevSoundAdaptation::CBody::UpdatePolicyState()>ENTR
       121.560	3c400310:CMMFDevSoundAdaptation::CBody::UpdatePolicyState()>EXIT
       121.560	3c400310:CMMFDevSoundAdaptation::CBody::Stopped()>EXIT
       121.560	3c400310:CMMFDevSoundAdaptation::CBody::Error(int)>ENTR
       121.560	3c400310:CMMFDevSoundAdaptation::CBody::Error(int)>EXIT
       121.560	Thread MMFAudioServer.exe::Local-015fb998 Panic KERN-EXEC 0
    Last edited by Dragon_L; 2008-10-31 at 16:24.

  2. #2
    Registered User
    Join Date
    Dec 2005
    Posts
    1,236

    Re: help~~~about the CMdaAudioInputStream

    Perhaps you could post some code so that it would be easier to track down the problem.
    Regards,
    Sriky

  3. #3
    Registered User
    Join Date
    May 2005
    Location
    Indonesia
    Posts
    198

    Re: help~~~about the CMdaAudioInputStream

    Hi,

    KERN-EXEC 0 usually raise when you have not open the R class but you already use it.
    You can paste part of your code, which is the line that generates the error to make the problem clearer.

    best regards,
    Ronald Stevanus

  4. #4
    Registered User
    Join Date
    Oct 2008
    Posts
    24

    Re: help~~~about the CMdaAudioInputStream

    here is the code to record and play sound data/
    Code:
    #include "SoundEngine.h"
    #include <mda\common\audio.h>
    #include <mdaaudioinputstream.h>
    #include <mdaaudiooutputstream.h>
    #include "CChain.h"
    #include <stdio.h>
    SoundEngine::SoundEngine(CChain& aRecordPakets,CChain& aPlayPakcets):CActive(CActive::EPriorityStandard),iRecordPakets(aRecordPakets),iPlayPakcets(aPlayPakcets)
    {
    	iInputStream=0;
    	iOutputStream=0;
    	iInputStatus=ENotReady;
    	iOutputStatus=ENotReady;
    	iStreamSettings.iChannels=TMdaAudioDataSettings::EChannelsMono;
    	iStreamSettings.iSampleRate=TMdaAudioDataSettings::ESampleRate8000Hz;
    	
    }
    
    SoundEngine::~SoundEngine()
    {
    	if (iInputStream)
    		{
    			if (iInputStatus!=ENotReady) iInputStream->Stop();
    		    delete iInputStream;
    	    	iInputStream=NULL;
    		}
    	if (iOutputStream)
    		{
    			if (iOutputStatus!=ENotReady) iOutputStream->Stop();
    		    delete iOutputStream;
    	    	iOutputStream=NULL;
    		}
    	Cancel();
    	iIntervalTimer.Close();
    }
    SoundEngine*SoundEngine:: NewL(CChain& aRecordPakets,CChain& aPlayPakcets)
    	{
    		SoundEngine* self = SoundEngine::NewLC(aRecordPakets,aPlayPakcets);
    		CleanupStack::Pop(self);
    		return self;
    	}
    SoundEngine* SoundEngine::NewLC(CChain& aRecordPakets,CChain& aPlayPakcets)
    	{
    		SoundEngine* self = new (ELeave) SoundEngine(aRecordPakets,aPlayPakcets);
    		CleanupStack::PushL(self);
    		self->ConstructL();
    		return self;
    	}
    void SoundEngine::ConstructL()
    	{
    		iInputStream = CMdaAudioInputStream::NewL(*this);
    		//iOutputStream = CMdaAudioOutputStream::NewL(*this);
    		User::LeaveIfError(iIntervalTimer.CreateLocal());
    		this->Record();
    		CActiveScheduler::Add(this);
    	}
    
    void SoundEngine::Stop()
    	{
    		if (iInputStatus!=ENotReady) 
    			{
    				iInputStream->Stop();
    			}		
    		if (iOutputStatus!=ENotReady) 
    			{
    				iOutputStream->Stop();
    			}
    	}
    void SoundEngine::Record()
    	{
    		if (iInputStatus==EOpen) 
    			{
    				return;
    			}
    		#ifndef __SERIES60_3X__  
    			if (iInputStream) 
    				delete iInputStream;
    			iInputStream = NULL; 
    			TRAPD(err, iInputStream = CMdaAudioInputStream::NewL(*this));
    			if(err!=KErrNone)
    				{
    					return;
    				}
    		#endif
    		iInputStream->Open(&iStreamSettings);
    	}
    void SoundEngine::Play()
    	{
    		if (iOutputStatus!=ENotReady) 
    			{
    				return;
    			}
    			#ifndef __SERIES60_3X__  
    				if (iOutputStream) 
    					delete iOutputStream;
    				iOutputStream = NULL; 
    				TRAPD(err, iOutputStream = CMdaAudioOutputStream::NewL(*this));
    				if(err!=KErrNone)
    				{
    					return;
    				}
    			#endif
    			iOutputStream->Open(&iStreamSettings);
    	}
    void SoundEngine::MaoscPlayComplete(TInt aError)
    	{
    		
    	}
    void SoundEngine::MaoscBufferCopied(TInt aError, const TDesC8& aBuffer)
    	{
    		if(this->iPlayPakcets.NotNull())
    			{
    			TBuf8<buffersize> temp;
    			iPlayPakcets.GetBuff(temp);
    			this->iOutputStream->WriteL(temp);
    			}
    		else
    			Check();
    	}
    void SoundEngine::MaoscOpenComplete(TInt aError)
    	{
    		this->iOutputStream->SetVolume(iOutputStream->MaxVolume());
    		Check();
    	}
    void SoundEngine::MaiscRecordComplete(TInt aError)
    	{
    		if(aError==0)
    		printf("error");
    	}
    void SoundEngine::MaiscBufferCopied(TInt aError, const TDesC8& aBuffer)
    	{
    		this->iRecordPakets.NewBuff(aBuffer);
    		iRecordBuffer.FillZ(buffersize);
    		TRAPD(error2, iInputStream->ReadL(iRecordBuffer));
    		if(error2!=KErrNone)
    							return;
    	}
    void SoundEngine::MaiscOpenComplete(TInt aError)
    	{
    		if(aError==KErrNone)
    			{
    				printf("record completed");
    				iInputStatus = EOpen;
    				iInputStream->SetGain(iInputStream->MaxGain());	
    				iInputStream->SetPriority(EPriorityNormal, EMdaPriorityPreferenceNone);
    				TRAPD(error2, iInputStream->ReadL(iRecordBuffer));
    				if(error2!=KErrNone)
    					return;
    			}
    		else 
    			{
    				iInputStatus = ENotReady;
    			}
    	}
    
    void SoundEngine::Check()
    	{
    		iIntervalTimer.After(iStatus,TTimeIntervalMicroSeconds32(10000));
    		this->SetActive();
    	}
    void SoundEngine::RunL()
    	{
    		if(!this->iPlayPakcets.NotNull())
    			Check();
    		else
    			{
    				TBuf8<buffersize> temp;
    				iPlayPakcets.GetBuff(temp);
    				this->iOutputStream->WriteL(temp);
    			}
    			
    	}
    void SoundEngine::DoCancel()
    	{
    		iIntervalTimer.Cancel();
    	}
    Last edited by Dragon_L; 2008-10-31 at 16:22.

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,740

    Re: help~~~about the CMdaAudioInputStream

    Using [CODE ] and [/CODE ] tags (without the spaces) would make your code a bit easier to read.
    What is surely a bad idea is passing local variables to CMdaAudioOutputStream::WriteL.
    What is a bit hazy is the role of the timer, but it probably works as I see.

  6. #6
    Registered User
    Join Date
    Oct 2008
    Posts
    24

    Re: help~~~about the CMdaAudioInputStream

    Thanks,I didn't know how to use tags yet.
    the timer is to pause writeL when there is not data in the queue of data received from the socket connection.
    the question I want to ask is that when I just test the function of record in the class , I get the panic 0 after having recorded for some time. the information gotten when debuging has been given above.

    Quote Originally Posted by wizard_hu_ View Post
    Using [CODE ] and [/CODE ] tags (without the spaces) would make your code a bit easier to read.
    What is surely a bad idea is passing local variables to CMdaAudioOutputStream::WriteL.
    What is a bit hazy is the role of the timer, but it probably works as I see.

  7. #7
    Registered User
    Join Date
    Oct 2008
    Posts
    24

    Re: help~~~about the CMdaAudioInputStream

    Today I get another strange problem~~~~The Recorder work well today, and I have recorrected the wrong use of the local variable. It can receive the sound data, but the sound stop after remaining for some time,while new data still being received.
    Code:
            65.165	WSOCK: Protocol: [0DD23694] 1 socket(s) have unread data
        65.165	WSOCK: ServProvider: [0DD2409C] 4108 bytes in socket, 0 bytes unread
        65.165	WSOCK: ServProvider: [0DD2409C] indicating (at least) 1 datagram
        65.165	WSOCK: ServProvider: [0DD2409C] 4109 bytes requested, 4108 bytes unread
        65.165	WSOCK: Protocol: [0DD23694] 0 socket(s) have unread data
        65.165	WSOCK: ServProvider: [0DD2409C] 0 bytes in socket, 0 bytes unread
        65.165	WSOCK: ServProvider: [0DD2409C] received 4108 bytes, 0 bytes left
        65.335	CMMFDevSoundSession[0x3d710238]::DoPlayDataL - Enter
        65.380	3d710310:CMMFDevSoundAdaptation::CBody::PlayData()>ENTR
        65.380	3d710310:CMMFDevSoundAdaptation::CBody::PlayData()>EXIT
        65.380	CMMFDevSoundSession[0x3d710238]::DoPlayDataL - Exit
        65.380	3d710310:CMMFDevSoundAdaptation::CBody::FillThisHwBuffer(CMMFBuffer &)>ENTR
        65.380	CMMFDevSoundSession[0x3d710238]::BufferToBeFilled - Enter:
        65.380	CMMFDevSoundSession[0x3d710238]::BufferToBeFilled - Exit [0]
        65.380	3d710310:CMMFDevSoundAdaptation::CBody::FillThisHwBuffer(CMMFBuffer &)>EXIT
        65.415	WSOCK: Protocol: [0DD23694] 1 socket(s) have unread data
        65.415	WSOCK: ServProvider: [0DD2409C] 4108 bytes in socket, 0 bytes unread
        65.415	WSOCK: ServProvider: [0DD2409C] indicating (at least) 1 datagram
        65.415	WSOCK: ServProvider: [0DD2409C] 4109 bytes requested, 4108 bytes unread
        65.420	WSOCK: Protocol: [0DD23694] 0 socket(s) have unread data
        65.420	WSOCK: ServProvider: [0DD2409C] 0 bytes in socket, 0 bytes unread
        65.420	WSOCK: ServProvider: [0DD2409C] received 4108 bytes, 0 bytes left
        65.595	CMMFDevSoundSession[0x3d710238]::DoPlayDataL - Enter
        65.595	3d710310:CMMFDevSoundAdaptation::CBody::PlayData()>ENTR
        65.595	3d710310:CMMFDevSoundAdaptation::CBody::PlayData()>EXIT
        65.595	CMMFDevSoundSession[0x3d710238]::DoPlayDataL - Exit
        65.595	3d710310:CMMFDevSoundAdaptation::CBody::FillThisHwBuffer(CMMFBuffer &)>ENTR
        65.595	CMMFDevSoundSession[0x3d710238]::BufferToBeFilled - Enter:
        65.595	CMMFDevSoundSession[0x3d710238]::BufferToBeFilled - Exit [0]
        65.595	3d710310:CMMFDevSoundAdaptation::CBody::FillThisHwBuffer(CMMFBuffer &)>EXIT
        65.665	WSOCK: Protocol: [0DD23694] 1 socket(s) have unread data
        65.665	WSOCK: ServProvider: [0DD2409C] 4108 bytes in socket, 0 bytes unread
        65.665	WSOCK: ServProvider: [0DD2409C] indicating (at least) 1 datagram
        65.665	WSOCK: ServProvider: [0DD2409C] 4109 bytes requested, 4108 bytes unread
        65.665	WSOCK: Protocol: [0DD23694] 0 socket(s) have unread data
        65.665	WSOCK: ServProvider: [0DD2409C] 0 bytes in socket, 0 bytes unread
        65.665	WSOCK: ServProvider: [0DD2409C] received 4108 bytes, 0 bytes left
        65.830	CMMFDevSoundSession[0x3d710238]::DoPlayDataL - Enter
        65.830	3d710310:CMMFDevSoundAdaptation::CBody::PlayData()>ENTR
        65.830	3d710310:CMMFDevSoundAdaptation::CBody::PlayData()>EXIT
        65.830	CMMFDevSoundSession[0x3d710238]::DoPlayDataL - Exit
        65.830	3d710310:CMMFDevSoundAdaptation::CBody::FillThisHwBuffer(CMMFBuffer &)>ENTR
        65.830	CMMFDevSoundSession[0x3d710238]::BufferToBeFilled - Enter:
        65.830	CMMFDevSoundSession[0x3d710238]::BufferToBeFilled - Exit [0]
        65.835	3d710310:CMMFDevSoundAdaptation::CBody::FillThisHwBuffer(CMMFBuffer &)>EXIT
        65.945	WSOCK: Protocol: [0DD23694] 1 socket(s) have unread data
        65.945	WSOCK: ServProvider: [0DD2409C] 4108 bytes in socket, 0 bytes unread
        65.945	WSOCK: ServProvider: [0DD2409C] indicating (at least) 1 datagram
        65.945	WSOCK: ServProvider: [0DD2409C] 4109 bytes requested, 4108 bytes unread
        65.950	WSOCK: Protocol: [0DD23694] 0 socket(s) have unread data
        65.950	WSOCK: ServProvider: [0DD2409C] 0 bytes in socket, 0 bytes unread
        65.950	WSOCK: ServProvider: [0DD2409C] received 4108 bytes, 0 bytes left
        66.175	WSOCK: Protocol: [0DD23694] 1 socket(s) have unread data
        66.175	WSOCK: ServProvider: [0DD2409C] 4108 bytes in socket, 0 bytes unread
        66.175	WSOCK: ServProvider: [0DD2409C] indicating (at least) 1 datagram
        66.275	WSOCK: ServProvider: [0DD2409C] 4109 bytes requested, 4108 bytes unread
        66.275	WSOCK: Protocol: [0DD23694] 0 socket(s) have unread data
        66.275	WSOCK: ServProvider: [0DD2409C] 0 bytes in socket, 0 bytes unread
        66.275	WSOCK: ServProvider: [0DD2409C] received 4108 bytes, 0 bytes left
        66.320	CMMFDevSoundSession[0x3d710238]::DoPlayDataL - Enter
        66.320	3d710310:CMMFDevSoundAdaptation::CBody::PlayData()>ENTR
        66.320	3d710310:CMMFDevSoundAdaptation::CBody::PlayData()>EXIT
        66.320	CMMFDevSoundSession[0x3d710238]::DoPlayDataL - Exit
        66.320	3d710310:CMMFDevSoundAdaptation::CBody::FillThisHwBuffer(CMMFBuffer &)>ENTR
        66.325	CMMFDevSoundSession[0x3d710238]::BufferToBeFilled - Enter:
        66.325	CMMFDevSoundSession[0x3d710238]::BufferToBeFilled - Exit [0]
        66.325	3d710310:CMMFDevSoundAdaptation::CBody::FillThisHwBuffer(CMMFBuffer &)>EXIT
        66.350	CDirectXHwDevice[0x3d710fa0]::Error: -10why does this happen    66.450	WSOCK: Protocol: [0DD23694] 1 socket(s) have unread data
        66.450	WSOCK: ServProvider: [0DD2409C] 4108 bytes in socket, 0 bytes unread
        66.450	WSOCK: ServProvider: [0DD2409C] indicating (at least) 1 datagram
        66.450	WSOCK: ServProvider: [0DD2409C] 4109 bytes requested, 4108 bytes unread
        66.450	WSOCK: Protocol: [0DD23694] 0 socket(s) have unread data
        66.450	WSOCK: ServProvider: [0DD2409C] 0 bytes in socket, 0 bytes unread
        66.450	WSOCK: ServProvider: [0DD2409C] received 4108 bytes, 0 bytes left
        66.475	CMMFDevSoundSession[0x3d710238]::DoPlayDataL - Enter
        66.475	3d710310:CMMFDevSoundAdaptation::CBody::PlayData()>ENTR
        66.475	3d710310:CMMFDevSoundAdaptation::CBody::PlayData()>EXIT
        66.475	CMMFDevSoundSession[0x3d710238]::DoPlayDataL - Exit
        66.475	3d710310:CMMFDevSoundAdaptation::CBody::FillThisHwBuffer(CMMFBuffer &)>ENTR
        66.475	CMMFDevSoundSession[0x3d710238]::BufferToBeFilled - Enter:
        66.475	CMMFDevSoundSession[0x3d710238]::BufferToBeFilled - Exit [0]
        66.475	3d710310:CMMFDevSoundAdaptation::CBody::FillThisHwBuffer(CMMFBuffer &)>EXIT
        66.610	CMMFDevSoundSession[0x3d710238]::DoPlayDataL - Enter
        66.610	3d710310:CMMFDevSoundAdaptation::CBody::PlayData()>ENTR
        66.610	3d710310:CMMFDevSoundAdaptation::CBody::PlayData()>EXIT
        66.610	CMMFDevSoundSession[0x3d710238]::DoPlayDataL - Exit
        66.610	3d710310:CMMFDevSoundAdaptation::CBody::FillThisHwBuffer(CMMFBuffer &)>ENTR
        66.610	CMMFDevSoundSession[0x3d710238]::BufferToBeFilled - Enter:
        66.610	CMMFDevSoundSession[0x3d710238]::BufferToBeFilled - Exit [0]
        66.610	3d710310:CMMFDevSoundAdaptation::CBody::FillThisHwBuffer(CMMFBuffer &)>EXIT
        66.720	WSOCK: Protocol: [0DD23694] 1 socket(s) have unread data
        66.720	WSOCK: ServProvider: [0DD2409C] 4108 bytes in socket, 0 bytes unread
        66.720	WSOCK: ServProvider: [0DD2409C] indicating (at least) 1 datagram
        66.720	WSOCK: ServProvider: [0DD2409C] 4109 bytes requested, 4108 bytes unread
        66.720	WSOCK: Protocol: [0DD23694] 0 socket(s) have unread data
        66.720	WSOCK: ServProvider: [0DD2409C] 0 bytes in socket, 0 bytes unread
        66.720	WSOCK: ServProvider: [0DD2409C] received 4108 bytes, 0 bytes left
        66.835	CMMFDevSoundSession[0x3d710238]::DoPlayDataL - Enter
        66.835	3d710310:CMMFDevSoundAdaptation::CBody::PlayData()>ENTR
        66.835	3d710310:CMMFDevSoundAdaptation::CBody::PlayData()>EXIT
        66.835	CMMFDevSoundSession[0x3d710238]::DoPlayDataL - Exit
        66.945	WSOCK: Protocol: [0DD23694] 1 socket(s) have unread data
        66.945	WSOCK: ServProvider: [0DD2409C] 4108 bytes in socket, 0 bytes unread
        66.945	WSOCK: ServProvider: [0DD2409C] indicating (at least) 1 datagram
        66.945	WSOCK: ServProvider: [0DD2409C] 4109 bytes requested, 4108 bytes unread
        66.945	WSOCK: Protocol: [0DD23694] 0 socket(s) have unread data
        66.945	WSOCK: ServProvider: [0DD2409C] 0 bytes in socket, 0 bytes unread
        66.950	WSOCK: ServProvider: [0DD2409C] received 4108 bytes, 0 bytes left
        67.205	WSOCK: Protocol: [0DD23694] 1 socket(s) have unread data
        67.205	WSOCK: ServProvider: [0DD2409C] 4108 bytes in socket, 0 bytes unread
        67.205	WSOCK: ServProvider: [0DD2409C] indicating (at least) 1 datagram
        67.205	WSOCK: ServProvider: [0DD2409C] 4109 bytes requested, 4108 bytes unread
        67.205	WSOCK: Protocol: [0DD23694] 0 socket(s) have unread data
        67.205	WSOCK: ServProvider: [0DD2409C] 0 bytes in socket, 0 bytes unread
        67.205	WSOCK: ServProvider: [0DD2409C] received 4108 bytes, 0 bytes left
        67.465	WSOCK: Protocol: [0DD23694] 1 socket(s) have unread data

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,740

    Re: help~~~about the CMdaAudioInputStream

    If you treat -10 as a standard Symbian error code (http://wiki.forum.nokia.com/index.php/Error_codes), it may make sense in the given context. The name CDirectXHwDevice itself may mean that the emulator uses DirectX for accessing audio hardware.
    If this error code does not reach your code, you should not really care about it, since it seems to be internal to the emulator.

  9. #9
    Registered User
    Join Date
    Oct 2008
    Posts
    24

    Re: help~~~about the CMdaAudioInputStream

    Quote Originally Posted by wizard_hu_ View Post
    If you treat -10 as a standard Symbian error code (http://wiki.forum.nokia.com/index.php/Error_codes), it may make sense in the given context. The name CDirectXHwDevice itself may mean that the emulator uses DirectX for accessing audio hardware.
    If this error code does not reach your code, you should not really care about it, since it seems to be internal to the emulator.
    I have find the problem. when the outputstream has played for some time, the WriteL didn't call the MaiscBufferCopied, which make the playing stop. Could you tell me in what case the WriteL would not work well.

  10. #10
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: help~~~about the CMdaAudioInputStream

    Are you saying you stopped getting buffer copied callbacks completely? Or that you just didn't get one immediately in response to a WriteL()?

    The audio output stream copies the buffers and queues them up internally. If you feed it data faster than it is playing it then eventually you'll run out of buffers to fill/queue and won't get any more callbacks until it has emptied another buffer.

    It's hard to guess from your trace output but it looks like you're reading data from the network and then trying to play it. Maybe you are just running out of resources because the data is coming in too fast???

    The other possibility is that you feed the data in too slow and you get an underflow error. At that point the audio output stream stops (although calling WriteL() again should start it up again).

    Sorcery

  11. #11
    Registered User
    Join Date
    Oct 2008
    Posts
    24

    Re: help~~~about the CMdaAudioInputStream

    Quote Originally Posted by Sorcery-ltd View Post
    Are you saying you stopped getting buffer copied callbacks completely? Or that you just didn't get one immediately in response to a WriteL()?

    The audio output stream copies the buffers and queues them up internally. If you feed it data faster than it is playing it then eventually you'll run out of buffers to fill/queue and won't get any more callbacks until it has emptied another buffer.

    It's hard to guess from your trace output but it looks like you're reading data from the network and then trying to play it. Maybe you are just running out of resources because the data is coming in too fast???

    The other possibility is that you feed the data in too slow and you get an underflow error. At that point the audio output stream stops (although calling WriteL() again should start it up again).

    Sorcery
    Yes,I am read data from another client on the Internet. what could I do if it is because of running out the buffers in the queue. The sound also stop when the writel didn't call the callback, maybe it can't be too fast. What's more the data is recorded by CMdaAudioInputStream and sent immidiately when compeleted, could It be send too fast?

  12. #12
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: help~~~about the CMdaAudioInputStream

    Hi,

    Sounds more likely to be underflow problems than overflow problems. Check that you aren't getting a MaoscPlayComplete callback with KErrUnderflow. If so, see what happens after this in your code (you ignore the callback completely at the moment).

    I'd suggest storing a couple of buffers before you start making the WriteL() calls at the beginning of the stream unless latency is critical - it just allows a little more leeway for delayed packets in this kind of real-time streaming situation.

    Sorcery

  13. #13
    Registered User
    Join Date
    Oct 2008
    Posts
    24

    Re: help~~~about the CMdaAudioInputStream

    Quote Originally Posted by Sorcery-ltd View Post
    Hi,

    Sounds more likely to be underflow problems than overflow problems. Check that you aren't getting a MaoscPlayComplete callback with KErrUnderflow. If so, see what happens after this in your code (you ignore the callback completely at the moment).

    I'd suggest storing a couple of buffers before you start making the WriteL() calls at the beginning of the stream unless latency is critical - it just allows a little more leeway for delayed packets in this kind of real-time streaming situation.

    Sorcery
    But I have made a breakpoint in the MaoscPlayComplete when debuging the program, I am sure that no MaoscPlayComplete is called.
    this program is just the beginning of the project. I only want to test how to operate the real-time audio communicaiton now. More methods to guarantee the quality of the communication will be added later.

  14. #14
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: help~~~about the CMdaAudioInputStream

    Maybe, but since your implementaton of the callback is empty it may have been optimized away - there might not actually be a point there where you can set a working breakpoint.

    It does seem like there might be some other problem though. However, one important thing to know about working on Symbian audio is that the real devices are completely different to the emulator (timing, buffer sizes, errors reported, everything except the interface really) - you really need to debug your engine on a target device or two.

    Sorcery

  15. #15
    Registered User
    Join Date
    Oct 2008
    Posts
    24

    Re: help~~~about the CMdaAudioInputStream

    Quote Originally Posted by Sorcery-ltd View Post
    Maybe, but since your implementaton of the callback is empty it may have been optimized away - there might not actually be a point there where you can set a working breakpoint.

    It does seem like there might be some other problem though. However, one important thing to know about working on Symbian audio is that the real devices are completely different to the emulator (timing, buffer sizes, errors reported, everything except the interface really) - you really need to debug your engine on a target device or two.

    Sorcery

    Thanks very much for telling me so much,especially somthing I can't find in books. We will test on devices soon. Thanks again.

Similar Threads

  1. CMdaAudioInputStream shared threads problem
    By noam segal in forum Symbian Media (Closed)
    Replies: 7
    Last Post: 2008-11-26, 14:44
  2. voice message using CMdaAudioInputStream
    By anglina in forum Symbian
    Replies: 0
    Last Post: 2007-02-21, 11:19
  3. N91, GSM 610 CMdaAudioInputStream problem
    By symfrog in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2006-10-01, 20:27
  4. Replies: 1
    Last Post: 2006-08-02, 13:27
  5. CMdaAudioInputStream v7
    By damien.vil in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2004-02-24, 17:57

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×