Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2dbc7d5c
Commit
2dbc7d5c
authored
Mar 29, 2009
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Added support for SND_ALIAS_ID in winmm.PlaySound[AW].
parent
fac74963
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
7 deletions
+46
-7
playsound.c
dlls/winmm/playsound.c
+33
-7
mmsystem.h
include/mmsystem.h
+13
-0
No files found.
dlls/winmm/playsound.c
View file @
2dbc7d5c
...
...
@@ -193,11 +193,12 @@ static BOOL PlaySound_IsString(DWORD fdwSound, const void* psz)
/* SND_RESOURCE is 0x40004 while
* SND_MEMORY is 0x00004
*/
switch
(
fdwSound
&
(
SND_RESOURCE
|
SND_ALIAS
|
SND_FILENAME
))
switch
(
fdwSound
&
(
SND_RESOURCE
|
SND_ALIAS
_ID
|
SND_FILENAME
))
{
case
SND_RESOURCE
:
return
HIWORD
(
psz
)
!=
0
;
/* by name or by ID ? */
case
SND_ALIAS_ID
:
case
SND_MEMORY
:
return
FALSE
;
case
SND_ALIAS
:
/* what about ALIAS_ID ??? */
case
SND_ALIAS
:
case
SND_FILENAME
:
case
0
:
return
TRUE
;
default:
FIXME
(
"WTF
\n
"
);
return
FALSE
;
...
...
@@ -309,6 +310,36 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg)
}
else
if
(
wps
->
fdwSound
&
SND_ALIAS
)
{
if
(
wps
->
fdwSound
&
SND_ALIAS_ID
)
{
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
};
wps
->
fdwSound
&=
~
(
SND_ALIAS_ID
^
SND_ALIAS
);
if
(
wps
->
pszSound
==
(
LPCWSTR
)
SND_ALIAS_SYSTEMASTERISK
)
wps
->
pszSound
=
wszSystemAsterisk
;
else
if
(
wps
->
pszSound
==
(
LPCWSTR
)
SND_ALIAS_SYSTEMDEFAULT
)
wps
->
pszSound
=
wszSystemDefault
;
else
if
(
wps
->
pszSound
==
(
LPCWSTR
)
SND_ALIAS_SYSTEMEXCLAMATION
)
wps
->
pszSound
=
wszSystemExclamation
;
else
if
(
wps
->
pszSound
==
(
LPCWSTR
)
SND_ALIAS_SYSTEMEXIT
)
wps
->
pszSound
=
wszSystemExit
;
else
if
(
wps
->
pszSound
==
(
LPCWSTR
)
SND_ALIAS_SYSTEMHAND
)
wps
->
pszSound
=
wszSystemHand
;
else
if
(
wps
->
pszSound
==
(
LPCWSTR
)
SND_ALIAS_SYSTEMQUESTION
)
wps
->
pszSound
=
wszSystemQuestion
;
else
if
(
wps
->
pszSound
==
(
LPCWSTR
)
SND_ALIAS_SYSTEMSTART
)
wps
->
pszSound
=
wszSystemStart
;
else
if
(
wps
->
pszSound
==
(
LPCWSTR
)
SND_ALIAS_SYSTEMWELCOME
)
wps
->
pszSound
=
wszSystemWelcome
;
else
return
FALSE
;
}
hmmio
=
get_mmioFromProfile
(
wps
->
fdwSound
,
wps
->
pszSound
);
}
else
if
(
wps
->
fdwSound
&
SND_FILENAME
)
...
...
@@ -446,11 +477,6 @@ static BOOL MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSo
if
((
fdwSound
&
(
SND_NOWAIT
|
SND_NOSTOP
))
&&
PlaySoundList
!=
NULL
)
return
FALSE
;
if
((
fdwSound
&
SND_ALIAS_ID
)
==
SND_ALIAS_ID
)
{
FIXME
(
"SND_ALIAS_ID not supported
\n
"
);
return
FALSE
;
}
/* alloc internal structure, if we need to play something */
if
(
pszSound
&&
!
(
fdwSound
&
SND_PURGE
))
{
...
...
include/mmsystem.h
View file @
2dbc7d5c
...
...
@@ -285,6 +285,19 @@ BOOL WINAPI PlaySoundW(LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound);
#define SND_PURGE 0x00000040L
/* purge all sounds */
#define SND_APPLICATION 0x00000080L
/* look for application specific association */
#define SND_ALIAS_START 0
#define sndAlias(ch0, ch1) (SND_ALIAS_START + ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8)))
#define SND_ALIAS_SYSTEMASTERISK sndAlias('S', '*')
#define SND_ALIAS_SYSTEMQUESTION sndAlias('S', '?')
#define SND_ALIAS_SYSTEMHAND sndAlias('S', 'H')
#define SND_ALIAS_SYSTEMEXIT sndAlias('S', 'E')
#define SND_ALIAS_SYSTEMSTART sndAlias('S', 'S')
#define SND_ALIAS_SYSTEMWELCOME sndAlias('S', 'W')
#define SND_ALIAS_SYSTEMEXCLAMATION sndAlias('S', '!')
#define SND_ALIAS_SYSTEMDEFAULT sndAlias('S', 'D')
/* waveform audio error return values */
#define WAVERR_BADFORMAT (WAVERR_BASE + 0)
/* unsupported wave format */
#define WAVERR_STILLPLAYING (WAVERR_BASE + 1)
/* still something playing */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment