0
0

Hi,
I’m pretty new with fmod so don’t blame me if it’s newbee question :roll:
I try to implement fmod for listening flac and mp3 audio files in our application but I got a problem with background audio.
I download the sdk and I modified the sample ( play_sound) for listening flac file. It works find so second step is to listening it with background Audio for interract with the application even if it’s not in first plan.

I tried to add this:
FMOD_WINDOWSPHONE_EXTRADRIVERDATA extraDriverData = { };
extraDriverData.stream_type = FMOD_WINDOWSPHONE_STREAMTYPE_BACKGROUND;
FMOD_RESULT result = system->init(100, FMOD_INIT_NORMAL, &extraDriverData);

but unfortunately when the screen blank the music stop and even if the screen is on I can’t interract with hardware button.

I try to find a solution on the forum but WP8 looks pretty new in FMOD and there’s not many topic about it.
Thanks

  • You must to post comments
0
0

Hi Alexandre,

At present FMOD cannot play in the background on Windows Phone 8. All the API’s related to background audio are provided in .NET and as a native C++ library FMOD cannot access them.

  • You must to post comments
0
0

Hi Nick,

What are your plans regarding the support of background audio on the Windows Phone 8 Platform ?
Is it on your schedule ?

We would have this requirement for a store application that needs to play a FLAC Stream in the system player, as background audio player.

Thanks,

Eric

  • You must to post comments
0
0

Hi Eric,

I’ve created a sample that shows how to integrate FMOD for decompression with the background audio API. It is a proof of concept only, not production ready code. It contains no error checking and blocks instead of working asynchronously. Download it here http://fmod.org/files/FmodWP8BackgroundSample.7z

FMOD will never be able to continue playing it’s main output when the application is placed in the background. Microsoft doesn’t provide the underlying functionality needed.

  • You must to post comments
0
0

Hi,

[i:nlscvt9j]FMOD will never be able to continue playing it’s main output when the application is placed in the background. Microsoft doesn’t provide the underlying functionality needed.[/i:nlscvt9j]

In that case, I’ve found a bug. 😕

I’ve added FMOD_WINDOWSPHONE_STREAMTYPE_BACKGROUND to the streaming sample (play_stream). (like Alexandre in the first post)
When I press windows or power button the stream stops, but after 20 sec it continues playing. And stop again after 1minute.

Anyway, your sample works well. Can I play a tracked module (xm, s3m) in the background in the same way? (using getWaveData on the channel)

Regards,
Peter

  • You must to post comments
0
0

Hi Peter,

Thanks for the bug report. I’ll investigate the issue.

You should be able to modify the sample for tracker files, but I would call System::setOutputMode(FMOD_OUTPUTTYPE_NOSOUND_NRT) before System::init(). This will means the mixer we only run and produce samples whenever System::Update() is called, as opposed to running on a timer.

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.