0
0

When I try to create a new stream:

[quote:2t3o1rnp]FMOD.RESULT rcode = _system.createStream(url, mode, ref stream);
[/quote:2t3o1rnp]

I’m getting back ERR_INITIALIZATION if this runs in a windows service. It works fine as a standalone program.

Any ideas?

  • You must to post comments
0
0

try to not use automatic configuration with -1 in fmod_init
but maybe it’s imposible to use sound in a windows service…

  • You must to post comments
0
0

I think it is imposible to use sound in a Windows service and therefor FMOD fails on initializing.
What you could do is write a (tray)application that monitors your service and plays the sounds, this could then also be used as a GUI admin tool or something.

  • You must to post comments
0
0

I would be really surprised if you could not use sound in a windows service.

Just think of all the services such as Anti-virus, Exchange, SQL server etc…

Why you would use sound in a service is a totally different matter ๐Ÿ˜€

David

  • You must to post comments
0
0

The reason sound may not work in a service is because Windows’ sound support itself (in NT-based versions of Windows, anyway) relies on a service. Since service load order is not necessarily fixed, your service can’t use sound if it happens to load before the Windows sound support service. So the smart thing to do is disable sound support in services altogether.

Of course, this is just a guess, so don’t take it as gospel.

  • You must to post comments
0
0

[quote="ddebono":1wel7ic5]I would be really surprised if you could not use sound in a windows service.
Just think of all the services such as Anti-virus, Exchange, SQL server etc…
Why you would use sound in a service is a totally different matter ๐Ÿ˜€
David[/quote:1wel7ic5]

As I said, this is most likely done with a control application.
Also a guess of course.

  • You must to post comments
0
0

I have an application that renders audio using directshow.

It works perfectly as a windows service. the only complication was that I have to run it with administrator rights. Other than that, it works fine as a service.

  • You must to post comments
0
0

Brett, can you give me a debug dll or something that prints out more info on the failure? The error I’m getting is super generic and not really helping me out.

I’m waiting for my partner to finish papers with you to get the license for the src of FMOD Ex, otherwise I’d just debug it myself

  • You must to post comments
0
0

after getting a source license to fmodex, i see the problem.

if you pass in NULL for the extra data to init() on windows, using directsound output device, you set the DSBCAPS_GLOBALFOCUS on the directsound secondary buffer, but then you set the extra data (the hwnd passed to to the result of GetForegroundWindow().

the technique is solid, except in a windows service, in which case there is no foreground window! GetDesktopWindow() seems to work a lot better. would you mind making this change in the real codebase?

an alternative method would be to let the caller pass in an HWND, but also somehow let them set global focus.

  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.