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
33c8d7b8
Commit
33c8d7b8
authored
May 16, 2023
by
Shaun Ren
Committed by
Alexandre Julliard
Jun 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sapi: Add SpMMAudioOut stub.
parent
7acaf251
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
89 additions
and
0 deletions
+89
-0
Makefile.in
dlls/sapi/Makefile.in
+1
-0
main.c
dlls/sapi/main.c
+3
-0
mmaudio.c
dlls/sapi/mmaudio.c
+0
-0
sapi_classes.idl
dlls/sapi/sapi_classes.idl
+15
-0
sapi_private.h
dlls/sapi/sapi_private.h
+1
-0
Makefile.in
dlls/sapi/tests/Makefile.in
+1
-0
mmaudio.c
dlls/sapi/tests/mmaudio.c
+68
-0
No files found.
dlls/sapi/Makefile.in
View file @
33c8d7b8
...
...
@@ -4,6 +4,7 @@ IMPORTS = uuid ole32 user32 advapi32
C_SRCS
=
\
automation.c
\
main.c
\
mmaudio.c
\
resource.c
\
stream.c
\
token.c
\
...
...
dlls/sapi/main.c
View file @
33c8d7b8
...
...
@@ -105,6 +105,7 @@ static const struct IClassFactoryVtbl class_factory_vtbl =
static
struct
class_factory
data_key_cf
=
{
{
&
class_factory_vtbl
},
data_key_create
};
static
struct
class_factory
file_stream_cf
=
{
{
&
class_factory_vtbl
},
file_stream_create
};
static
struct
class_factory
mmaudio_out_cf
=
{
{
&
class_factory_vtbl
},
mmaudio_out_create
};
static
struct
class_factory
resource_mgr_cf
=
{
{
&
class_factory_vtbl
},
resource_manager_create
};
static
struct
class_factory
speech_stream_cf
=
{
{
&
class_factory_vtbl
},
speech_stream_create
};
static
struct
class_factory
speech_voice_cf
=
{
{
&
class_factory_vtbl
},
speech_voice_create
};
...
...
@@ -125,6 +126,8 @@ HRESULT WINAPI DllGetClassObject( REFCLSID clsid, REFIID iid, void **obj )
cf
=
&
data_key_cf
.
IClassFactory_iface
;
else
if
(
IsEqualCLSID
(
clsid
,
&
CLSID_SpFileStream
))
cf
=
&
file_stream_cf
.
IClassFactory_iface
;
else
if
(
IsEqualCLSID
(
clsid
,
&
CLSID_SpMMAudioOut
))
cf
=
&
mmaudio_out_cf
.
IClassFactory_iface
;
else
if
(
IsEqualCLSID
(
clsid
,
&
CLSID_SpObjectTokenCategory
))
cf
=
&
token_category_cf
.
IClassFactory_iface
;
else
if
(
IsEqualCLSID
(
clsid
,
&
CLSID_SpObjectTokenEnum
))
...
...
dlls/sapi/mmaudio.c
0 → 100644
View file @
33c8d7b8
This diff is collapsed.
Click to expand it.
dlls/sapi/sapi_classes.idl
View file @
33c8d7b8
...
...
@@ -103,3 +103,18 @@ coclass SpFileStream
interface ISpStream;
[default] interface ISpeechFileStream;
}
[
uuid(a8c680eb-3d32-11d2-9ee7-00c04f797396),
helpstring("SpMMAudioOut"),
progid("SAPI.SpMMAudioOut.1"),
vi_progid("SAPI.SpMMAudioOut"),
threading(both)
]
coclass SpMMAudioOut
{
interface ISpEventSource;
interface ISpEventSink;
interface ISpObjectWithToken;
interface ISpMMSysAudio;
}
dlls/sapi/sapi_private.h
View file @
33c8d7b8
...
...
@@ -25,6 +25,7 @@ HRESULT file_stream_create( IUnknown *outer, REFIID iid, void **obj ) DECLSPEC_H
HRESULT
resource_manager_create
(
IUnknown
*
outer
,
REFIID
iid
,
void
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
speech_stream_create
(
IUnknown
*
outer
,
REFIID
iid
,
void
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
speech_voice_create
(
IUnknown
*
outer
,
REFIID
iid
,
void
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
mmaudio_out_create
(
IUnknown
*
outer
,
REFIID
iid
,
void
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
token_category_create
(
IUnknown
*
outer
,
REFIID
iid
,
void
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
token_enum_create
(
IUnknown
*
outer
,
REFIID
iid
,
void
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
token_create
(
IUnknown
*
outer
,
REFIID
iid
,
void
**
obj
)
DECLSPEC_HIDDEN
;
dlls/sapi/tests/Makefile.in
View file @
33c8d7b8
...
...
@@ -3,6 +3,7 @@ IMPORTS = ole32 user32 advapi32
C_SRCS
=
\
automation.c
\
mmaudio.c
\
resource.c
\
stream.c
\
token.c
\
...
...
dlls/sapi/tests/mmaudio.c
0 → 100644
View file @
33c8d7b8
/*
* Speech API (SAPI) winmm audio tests.
*
* Copyright 2023 Shaun Ren for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include "sapiddk.h"
#include "sperror.h"
#include "wine/test.h"
static
void
test_interfaces
(
void
)
{
ISpMMSysAudio
*
mmaudio
;
IUnknown
*
unk
;
ISpEventSource
*
source
;
ISpEventSink
*
sink
;
ISpObjectWithToken
*
obj_with_token
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_SpMMAudioOut
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpMMSysAudio
,
(
void
**
)
&
mmaudio
);
ok
(
hr
==
S_OK
,
"Failed to create ISpMMSysAudio interface: %#lx.
\n
"
,
hr
);
ISpMMSysAudio_Release
(
mmaudio
);
hr
=
CoCreateInstance
(
&
CLSID_SpMMAudioOut
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"Failed to create IUnknown interface: %#lx.
\n
"
,
hr
);
IUnknown_Release
(
unk
);
hr
=
CoCreateInstance
(
&
CLSID_SpMMAudioOut
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpEventSource
,
(
void
**
)
&
source
);
ok
(
hr
==
S_OK
,
"Failed to create ISpEventSource interface: %#lx.
\n
"
,
hr
);
ISpEventSource_Release
(
source
);
hr
=
CoCreateInstance
(
&
CLSID_SpMMAudioOut
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpEventSink
,
(
void
**
)
&
sink
);
ok
(
hr
==
S_OK
,
"Failed to create ISpEventSink interface: %#lx.
\n
"
,
hr
);
ISpEventSink_Release
(
sink
);
hr
=
CoCreateInstance
(
&
CLSID_SpMMAudioOut
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpObjectWithToken
,
(
void
**
)
&
obj_with_token
);
ok
(
hr
==
S_OK
,
"Failed to create ISpObjectWithToken interface: %#lx.
\n
"
,
hr
);
ISpObjectWithToken_Release
(
obj_with_token
);
}
START_TEST
(
mmaudio
)
{
CoInitialize
(
NULL
);
test_interfaces
();
CoUninitialize
();
}
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