some small fixes
This commit is contained in:
parent
2ad0890bf2
commit
7afee80feb
2 changed files with 4 additions and 4 deletions
|
@ -199,11 +199,10 @@ void CSound::Start()
|
||||||
InitializeOpenSL();
|
InitializeOpenSL();
|
||||||
|
|
||||||
// TEST We have to supply the interface with initial buffers, otherwise
|
// 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
|
// the rendering will not start.
|
||||||
// an unknown state which could lead to lowed noises at the very startup
|
|
||||||
// of the rendering (which is not too bad).
|
|
||||||
// Note that the number of buffers enqueued here must match the maximum
|
// Note that the number of buffers enqueued here must match the maximum
|
||||||
// numbers of buffers configured in the constructor of this class.
|
// numbers of buffers configured in the constructor of this class.
|
||||||
|
vecsTmpAudioSndCrdStereo.Reset ( 0 );
|
||||||
|
|
||||||
// enqueue initial buffers for record
|
// enqueue initial buffers for record
|
||||||
(*recorderSimpleBufQueue)->Enqueue ( recorderSimpleBufQueue,
|
(*recorderSimpleBufQueue)->Enqueue ( recorderSimpleBufQueue,
|
||||||
|
@ -316,6 +315,7 @@ void CSound::processInput ( SLAndroidSimpleBufferQueueItf bufferQueue,
|
||||||
pSound->iModifiedInBufSize * 2 /* 2 bytes */ );
|
pSound->iModifiedInBufSize * 2 /* 2 bytes */ );
|
||||||
|
|
||||||
// upsampling (without filtering) and channel management
|
// upsampling (without filtering) and channel management
|
||||||
|
pSound->vecsTmpAudioSndCrdStereo.Reset ( 0 );
|
||||||
for ( int i = 0; i < pSound->iModifiedInBufSize; i++ )
|
for ( int i = 0; i < pSound->iModifiedInBufSize; i++ )
|
||||||
{
|
{
|
||||||
pSound->vecsTmpAudioSndCrdStereo[6 * i] =
|
pSound->vecsTmpAudioSndCrdStereo[6 * i] =
|
||||||
|
|
|
@ -37,7 +37,7 @@ class CSound : public CSoundBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* arg ), void* arg );
|
CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* arg ), void* arg );
|
||||||
virtual ~CSound() { CloseOpenSL(); }
|
virtual ~CSound() {}
|
||||||
|
|
||||||
virtual int Init ( const int iNewPrefMonoBufferSize );
|
virtual int Init ( const int iNewPrefMonoBufferSize );
|
||||||
virtual void Start();
|
virtual void Start();
|
||||||
|
|
Loading…
Reference in a new issue