I have a fully working mp3 player for Windows Mobile6 (Windows CE 5.x)
I noticed that when the CE device sleeps I must close FMOD using FSOUND_Close(); and then call FSOUND_Init() again. If I don’t no sound comes out. I know I can set the power mode not to sleep but this seems like a bandaid.
Has anyone else noticed this???
- PaulB asked 9 years ago
I added this to my project
[DllImport("coredll.dll", SetLastError = true)]
static extern int SetSystemPowerState(string psState, int StateFlags, int Options);
const int POWER_FORCE = 0x1000;
const int POWER_STATE_ON = 0x10000;
Then in the playback loop
SetSystemPowerState(null, POWER_STATE_ON, 0);
I also added this to my open
bool init_ok = FMOD.FSOUND_Init(22050, 16, FMOD.FSOUND_INIT_GLOBALFOCUS);
The reason for the close is to try to prevent a possible memory leak
- PaulB answered 9 years ago
Please login first to submit.