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
2d82fc42
Commit
2d82fc42
authored
Jan 14, 2006
by
Robert Reif
Committed by
Alexandre Julliard
Jan 14, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Add DSOUND_PrimarySetFormat and use it to set primary format.
parent
a5074584
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
dsound_private.h
dlls/dsound/dsound_private.h
+1
-0
primary.c
dlls/dsound/primary.c
+16
-10
No files found.
dlls/dsound/dsound_private.h
View file @
2d82fc42
...
...
@@ -498,6 +498,7 @@ HRESULT DSOUND_PrimaryDestroy(DirectSoundDevice *device);
HRESULT
DSOUND_PrimaryPlay
(
DirectSoundDevice
*
device
);
HRESULT
DSOUND_PrimaryStop
(
DirectSoundDevice
*
device
);
HRESULT
DSOUND_PrimaryGetPosition
(
DirectSoundDevice
*
device
,
LPDWORD
playpos
,
LPDWORD
writepos
);
HRESULT
DSOUND_PrimarySetFormat
(
DirectSoundDevice
*
device
,
LPCWAVEFORMATEX
wfex
);
/* buffer.c */
...
...
dlls/dsound/primary.c
View file @
2d82fc42
...
...
@@ -318,19 +318,12 @@ HRESULT DSOUND_PrimaryGetPosition(DirectSoundDevice *device, LPDWORD playpos, LP
return
DS_OK
;
}
/*******************************************************************************
* PrimaryBuffer
*/
/* This sets this format for the <em>Primary Buffer Only</em> */
/* See file:///cdrom/sdk52/docs/worddoc/dsound.doc page 120 */
static
HRESULT
WINAPI
PrimaryBufferImpl_SetFormat
(
LPDIRECTSOUNDBUFFER8
iface
,
LPCWAVEFORMATEX
wfex
)
{
DirectSoundDevice
*
device
=
((
PrimaryBufferImpl
*
)
iface
)
->
device
;
HRESULT
DSOUND_PrimarySetFormat
(
DirectSoundDevice
*
device
,
LPCWAVEFORMATEX
wfex
)
{
HRESULT
err
=
DS_OK
;
int
i
,
alloc_size
,
cp_size
;
DWORD
nSamplesPerSec
;
TRACE
(
"(%p,%p)
\n
"
,
ifa
ce
,
wfex
);
TRACE
(
"(%p,%p)
\n
"
,
devi
ce
,
wfex
);
if
(
device
->
priolevel
==
DSSCL_NORMAL
)
{
WARN
(
"failed priority check!
\n
"
);
...
...
@@ -430,6 +423,19 @@ done:
return
err
;
}
/*******************************************************************************
* PrimaryBuffer
*/
/* This sets this format for the <em>Primary Buffer Only</em> */
/* See file:///cdrom/sdk52/docs/worddoc/dsound.doc page 120 */
static
HRESULT
WINAPI
PrimaryBufferImpl_SetFormat
(
LPDIRECTSOUNDBUFFER8
iface
,
LPCWAVEFORMATEX
wfex
)
{
TRACE
(
"(%p,%p)
\n
"
,
iface
,
wfex
);
return
DSOUND_PrimarySetFormat
(((
PrimaryBufferImpl
*
)
iface
)
->
device
,
wfex
);
}
static
HRESULT
WINAPI
PrimaryBufferImpl_SetVolume
(
LPDIRECTSOUNDBUFFER8
iface
,
LONG
vol
)
{
...
...
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