0
0

Hi,

I have written my wrapper DLL to allow the fmod control to be used from a .NET application. All is fine with the exception on once I have started to play the stream, I can’t get control back to the user or any calling code to perform actions such as GetPosition(). This is obviously a HUGE problem for me.

Would anyone know how to change the structure of my eVC++ DLL (it simply acts as a proxy to the FMOD stuff through simple exposed functions). An example is:

extern “C” _declspec(dllexport) int WINAPI playMP3()
{
int channel ;

if(fileData == NULL)
{
    return 2 ;
}

if(playing)
{
    return 3 ;
}


channel = -1 ;

while(1) 
{
    channel = FSOUND_Stream_PlayEx(FSOUND_FREE, stream, NULL, TRUE);
    FSOUND_SetPaused(channel, FALSE) ;
    Sleep(10000) ;
}

return 1 ;

})

I am a newbie to this type of software development although have had a small ammount of exposure to Thread programming in C. My thoughts would be create a thread to do the playing, although I am not sure how I would share the stream between the thread performing the playing, and say the other thread to call the GetPosition(). Any help on this would a huge help.

  • You must to post comments
0
0

Sorry for that. It was me being stupid. That loop was obviously wrong and it was me getting the wrong end of the stick. Sorry again

/me sheepishly slides away and returns to c#.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.