0
0

Hi @ All ๐Ÿ˜‰ ,

I’ve written a wrapper class for FMOD Ex for my player… The following snippet shows the method to play a specific cd track:
[code:3bi5s56e]
bool CPlayback::PlayCDTrack(int iIndex)
{
// Check if the class was correctly initialized (with a audio cd):
if(this->_fSourceInit && this->_stSrcType == SRC_DISC)
{
try
{
// Start the playback:
if(this->_pFModSystem->playSound(FMOD_CHANNEL_REUSE, this->_pFModCDTracks.at(iIndex),
false, &this->_pFModChannel) != FMOD_OK)
{
this->_pFModChannel = NULL;
return (false);
}
this->_iCurCDTrack = iIndex;
this->_fPaused = false;
this->_fStopped = false;
this->_Update(); // <- Updates internal class members
return (true);
}
catch(...) // catch(out_of_range& cError)
{
// the overgiven index was invalid (the .at()-method detected the error):
return (false);
}
}

   return (false);

}
[/code:3bi5s56e]

My problem is that the playback always starts with the first track and after some milliseconds it continues with the specific track (iIndex)…Any Ideas to solve this bug ? (It should start directly with track iIndex :roll:)

If there is more code needed, just tell me -that’s no problem … 8)

I would be grateful for any help ๐Ÿ˜‰

Greezt

PS: "_pFModCDTracks" is of type std::vector (the C++ STL-vector class) and the disc was loaded with the flags: FMOD_2D | FMOD_LOOP_OFF | FMOD_SOFTWARE | FMOD_OPENONLY | FMOD_CDDA_JITTERCORRECT | FMOD_IGNORETAGS

  • You must to post comments
0
0

Ok i think its a bug in the fmod-system because as i d made some changes in the example-code ‘cdplayer’ so that it always starts with the second track but its the same: It always begins with the first track and after some ms. it continues with track 2 :( . Are there any (internal ๐Ÿ˜€ ) solutions for this problem ?

  • You must to post comments
0
0

I dont know, because when i tried it here it doesnt exhibit any problem like you’re saying, it always plays the correct start of the track without any other noise.

  • You must to post comments
0
0

lol, ok it works ๐Ÿ˜› …i tried an other cd and now it works fine.

Thx for ur reply ๐Ÿ˜‰ .

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.