some small fixes

This commit is contained in:
Volker Fischer 2014-02-01 17:12:51 +00:00
parent 2ad0890bf2
commit 7afee80feb
2 changed files with 4 additions and 4 deletions

View file

@ -199,11 +199,10 @@ void CSound::Start()
InitializeOpenSL();
// TEST We have to supply the interface with initial buffers, otherwise
// the rendering will not start. As a quick hack we use the buffers in
// an unknown state which could lead to lowed noises at the very startup
// of the rendering (which is not too bad).
// the rendering will not start.
// Note that the number of buffers enqueued here must match the maximum
// numbers of buffers configured in the constructor of this class.
vecsTmpAudioSndCrdStereo.Reset ( 0 );
// enqueue initial buffers for record
(*recorderSimpleBufQueue)->Enqueue ( recorderSimpleBufQueue,
@ -316,6 +315,7 @@ void CSound::processInput ( SLAndroidSimpleBufferQueueItf bufferQueue,
pSound->iModifiedInBufSize * 2 /* 2 bytes */ );
// upsampling (without filtering) and channel management
pSound->vecsTmpAudioSndCrdStereo.Reset ( 0 );
for ( int i = 0; i < pSound->iModifiedInBufSize; i++ )
{
pSound->vecsTmpAudioSndCrdStereo[6 * i] =

View file

@ -37,7 +37,7 @@ class CSound : public CSoundBase
{
public:
CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* arg ), void* arg );
virtual ~CSound() { CloseOpenSL(); }
virtual ~CSound() {}
virtual int Init ( const int iNewPrefMonoBufferSize );
virtual void Start();