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
0b0b72ec
Commit
0b0b72ec
authored
Jan 02, 2007
by
Robert Reif
Committed by
Alexandre Julliard
Jan 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmusic: Implement just enough of IDirectMusicPortImpl_GetFormat
to keep Direct Sound from crashing from unitialized data.
parent
d9057955
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
port.c
dlls/dmusic/port.c
+38
-0
No files found.
dlls/dmusic/port.c
View file @
0b0b72ec
...
...
@@ -171,7 +171,45 @@ static HRESULT WINAPI IDirectMusicPortImpl_SetDirectSound (LPDIRECTMUSICPORT ifa
static
HRESULT
WINAPI
IDirectMusicPortImpl_GetFormat
(
LPDIRECTMUSICPORT
iface
,
LPWAVEFORMATEX
pWaveFormatEx
,
LPDWORD
pdwWaveFormatExSize
,
LPDWORD
pdwBufferSize
)
{
IDirectMusicPortImpl
*
This
=
(
IDirectMusicPortImpl
*
)
iface
;
WAVEFORMATEX
format
;
FIXME
(
"(%p, %p, %p, %p): stub
\n
"
,
This
,
pWaveFormatEx
,
pdwWaveFormatExSize
,
pdwBufferSize
);
if
(
pWaveFormatEx
==
NULL
)
{
if
(
pdwWaveFormatExSize
)
*
pdwWaveFormatExSize
=
sizeof
(
format
);
else
return
E_POINTER
;
}
else
{
if
(
pdwWaveFormatExSize
==
NULL
)
return
E_POINTER
;
/* Just fill this in with something that will not crash Direct Sound for now. */
/* It won't be used anyway until Performances are completed */
format
.
wFormatTag
=
WAVE_FORMAT_PCM
;
format
.
nChannels
=
2
;
/* This->params.dwAudioChannels; */
format
.
nSamplesPerSec
=
44100
;
/* This->params.dwSampleRate; */
format
.
wBitsPerSample
=
16
;
/* FIXME: check this */
format
.
nBlockAlign
=
(
format
.
wBitsPerSample
*
format
.
nChannels
)
/
8
;
format
.
nAvgBytesPerSec
=
format
.
nSamplesPerSec
*
format
.
nBlockAlign
;
format
.
cbSize
=
0
;
if
(
*
pdwWaveFormatExSize
>=
sizeof
(
format
))
{
CopyMemory
(
pWaveFormatEx
,
&
format
,
min
(
sizeof
(
format
),
*
pdwWaveFormatExSize
));
*
pdwWaveFormatExSize
=
sizeof
(
format
);
/* FIXME check if this is set */
}
else
return
E_POINTER
;
/* FIXME find right error */
}
if
(
pdwBufferSize
)
*
pdwBufferSize
=
44100
*
2
*
2
;
else
return
E_POINTER
;
return
S_OK
;
}
...
...
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