How do I set up system sound effects in wine?
How do I set up system sound effects in wine?
I went onto the sound section onto the faq on wine help, and it only gave me how to assign SystemExclamation, and Default, but that's it, I don't know what are the names to the other notification strings, to play Critical Stop, aka error and I tried this for a long time and wine doesn't seem to give out the rest of the string names to me easily. If somebody actually knows more names, please, type it as a reply!
Re: How do I set up system sound effects in wine?
A quick look at the Wine Source code reveals all (as of Wine version 3.0-rc1):Enderdude wrote:I went onto the sound section onto the faq on wine help, and it only gave me how to assign SystemExclamation, and Default, but that's it, I don't know what are the names to the other notification strings, to play Critical Stop, aka error and I tried this for a long time and wine doesn't seem to give out the rest of the string names to me easily. If somebody actually knows more names, please, type it as a reply!
Code: Select all
static const WCHAR wszSystemAsterisk[] = {'S','y','s','t','e','m','A','s','t','e','r','i','s','k',0};
static const WCHAR wszSystemDefault[] = {'S','y','s','t','e','m','D','e','f','a','u','l','t',0};
static const WCHAR wszSystemExclamation[] = {'S','y','s','t','e','m','E','x','c','l','a','m','a','t','i','o','n',0};
static const WCHAR wszSystemExit[] = {'S','y','s','t','e','m','E','x','i','t',0};
static const WCHAR wszSystemHand[] = {'S','y','s','t','e','m','H','a','n','d',0};
static const WCHAR wszSystemQuestion[] = {'S','y','s','t','e','m','Q','u','e','s','t','i','o','n',0};
static const WCHAR wszSystemStart[] = {'S','y','s','t','e','m','S','t','a','r','t',0};
static const WCHAR wszSystemWelcome[] = {'S','y','s','t','e','m','W','e','l','c','o','m','e',0};
Re: How do I set up system sound effects in wine?
The sound effects actually don't play when it plays on windows, even though that the sounds are set in win.ini!
Re: How do I set up system sound effects in wine?
Here's a simple C source code that you can build with winegcc to test your Wine system sounds are setup correctly:Enderdude wrote:The sound effects actually don't play when it plays on windows, even though that the sounds are set in win.ini!
Code: Select all
wine_system_sound_test.cpp
#include <windows.h>
#include <mmsystem.h>
int main(int argc, char* argv[]) {
if (argc > 1)
PlaySoundA((LPCSTR) argv[1], NULL, SND_ALIAS | SND_SYNC);
else
{
PlaySoundA((LPCSTR) "SystemAsterisk", NULL, SND_ALIAS | SND_SYNC);
PlaySoundA((LPCSTR) "SystemDefault", NULL, SND_ALIAS | SND_SYNC);
PlaySoundA((LPCSTR) "SystemExclamation", NULL, SND_ALIAS | SND_SYNC);
PlaySoundA((LPCSTR) "SystemExit", NULL, SND_ALIAS | SND_SYNC);
PlaySoundA((LPCSTR) "SystemHand", NULL, SND_ALIAS | SND_SYNC);
PlaySoundA((LPCSTR) "SystemQuestion", NULL, SND_ALIAS | SND_SYNC);
PlaySoundA((LPCSTR) "SystemStart", NULL, SND_ALIAS | SND_SYNC);
PlaySoundA((LPCSTR) "SystemWelcome", NULL, SND_ALIAS | SND_SYNC);
}
}
Code: Select all
winegcc winmm.dll.so -o wine_system_sound_test wine_system_sound_test.cpp
Code: Select all
find /usr/ -name "winmm.dll.so"
Or plays a single system sound - if one is specified as an command line argument.
E.g.:
Code: Select all
wine wine_system_sound_test.exe.so SystemDefault
Re: How do I set up system sound effects in wine?
Here's the output of find:
Then the application quits
(EDIT I found it in /opt/wine-staging/lib/wine/)
Code: Select all
find /usr/ -name "winmm.dll.so"
find: ‘/usr/share/doc/google-chrome-stable’: Permission denied
(EDIT I found it in /opt/wine-staging/lib/wine/)
Re: How do I set up system sound effects in wine?
where can I get the include files?
Re: How do I set up system sound effects in wine?
Should I install wine-devel and remove wine-staging?
Re: How do I set up system sound effects in wine?
Don't worry about it... It's apparently way more hassle than it's worth to setup winegcc on Ubuntu...Enderdude wrote:Should I install wine-devel and remove wine-staging?
Mutters stuff about sticking to Gentoo...
Bob
Re: How do I set up system sound effects in wine?
Can you at least compile it so that I don't have to switch distros or get into confusion with configuring wine? Please?
Re: How do I set up system sound effects in wine?
I'll have a go - but that means building it with MinGW or Visual Studio - so it's a proper native PE Windows executable.Enderdude wrote:Can you at least compile it so that I don't have to switch distros or get into confusion with configuring wine? Please?
Which in my experience is a bit more fiddly!
Bob
Re: How do I set up system sound effects in wine?
@Enderdude,
Attached is a VS2010 compilation of the utility as a native Windows PE executable.
Tested and working under Windows 7 and Wine 3.0-rc2.
Bob
Attached is a VS2010 compilation of the utility as a native Windows PE executable.
Tested and working under Windows 7 and Wine 3.0-rc2.
Bob
- Attachments
-
- wine_system_sound_test.exe.gz
- (414 Bytes) Downloaded 178 times
Re: How do I set up system sound effects in wine?
Ummm... a window pops up saying, "access denied"
here's a terminal log:
here's a terminal log:
Code: Select all
test@test-thinkpad-t410:~$ wine '/home/test/winesfxtest/wine_system_sound_test.exe'
fixme:winediag:start_process Wine Staging 2.4 is a testing version containing experimental patches.
fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
fixme:ntoskrnl:KeInitializeEvent stub: 0x112998 1 0
fixme:ntoskrnl:KeInitializeEvent stub: 0x1129a8 1 1
fixme:ntoskrnl:PoSetPowerState (0x1 4 1124712) stub
wine: Unhandled page fault on read access to 0x40007600 at address 0x1126b0 (thread 0033), starting debugger...
wine: Bad EXE format for Z:\home\test\winesfxtest\wine_system_sound_test.exe.
test@test-thinkpad-t410:~$
Re: How do I set up system sound effects in wine?
Arse, that was the winegcc version I attached (as I suspected that wasn't very portable)...Enderdude wrote:Ummm... a window pops up saying, "access denied"
...
Sorry I've attached the VS2010 version this time!
Bob
- Attachments
-
- system_sound_test.exe.gz
- system_sound_test.exe
- (3.16 KiB) Downloaded 178 times
Re: How do I set up system sound effects in wine?
THANK YOU! It played the sounds when I opened the application