0
0

Hi,
I have the follow code

[code:zumdxjn5]
t_int32 nSize = _pvSeek.size();
FSBMap::iterator iterSee;
StreamMap::iterator iterStream;
t_int32* pnSeeker = new t_int32 [nSize];
t_bits32 nID = 0;
t_int32 nFinalSize = 0;

for (t_int32 i = 0; i< nSize; i++)
{
  nID = _pvSeek[i];
  iterSee= m_mapSeeker.find(nID);
  if (iterSee == m_mapSeeker.end())
    continue;
  pnSeeker[nFinalSize] = (*iterSee).second.m_nSeeker;
  nFinalSize++;
}
BOOL bResult = FALSE;
//Detenemos el stream por si las moscas
bResult = FSOUND_Stream_Stop (m_Stream.m_pStream);
FSOUND_Stream_SetSubStreamSentence (m_Stream.m_pStream,NULL,0);
assert (bResult);
//Seek the substream
if (nFinalSize >1 )
  bResult = FSOUND_Stream_SetSubStreamSentence (m_Stream.m_pStream,pnSeeker,nFinalSize);        
else if (nFinalSize == 1 )
  bResult = FSOUND_Stream_SetSubStream (m_Stream.m_pStream,pnSeeker[0]);
else if (nFinalSize == 1 )
{//If we haven´t stream to play exit
  delete [] pnSeeker;
  return false;
}

[/code:zumdxjn5]

used with a FSB stream with multi streams all work fine but sometime using FSOUND_Stream_SetSubStreamSentence bResult == false
How can i solves this problem, where is the problem.
m_Stream.m_pStream is valid stream
nFinalSize is >1

  • You must to post comments
0
0

Hi again,

Thank for the answer, now i have found the problem. One of my wav was stereo and with a sample rate of 44,100. The other are mono/ 11,025. After convert and resample, all right.
Thank again.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.